c83b7d9b69
Utils: fixed getNiceClosureName() not processing namespaced closures properly
2019-01-26 12:08:07 +00:00
2cdf97b7b5
CrashDump: Scan full stack trace to determine plugin involvement
2019-01-06 18:07:29 +00:00
4b9a142a5d
Import global functions and constants for enhanced performance
...
This is better for performance because these then don't need to be reevaluated every time they are called.
When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.
However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
1455c38dbe
Utils: fixed crash in getCoreCount(), closes #2600
...
this should just default to 2 instead of shitting its pants.
2018-12-22 13:27:11 +00:00
34a899e28b
Clean up Utils error handling functions (internal)
2018-12-16 17:50:00 +00:00
b80868040e
Utils: fixed getTrace() including itself in trace when no alt trace is given
...
it always seemed a little strange that crashdump trace would pop 4 frames when only 3 are written in the comment...
2018-12-16 17:15:16 +00:00
762405d16a
Add daverandom/callback-validator as a dependency
2018-12-04 17:14:37 +00:00
788b278fc3
Utils: fixed handling of non-anonymous closure functions
2018-11-11 19:43:00 +00:00
755db3dac8
Added a ClosureTask implementation for easier task scheduling ( #2497 )
2018-11-04 22:55:40 +00:00
7b24fbc8db
Utils: fix a mistake in getNiceClassName() doc
2018-11-04 22:38:38 +00:00
ab48d85c35
Properly deal with anonymous tasks in timings
2018-10-31 18:51:30 +00:00
45c9caa38c
Fixup some formatting issues
2018-10-21 18:15:25 +01:00
706c620d04
Move Internet-related functions from Utils into their own class ( #2324 )
...
- Added `Internet::getIP()`, `Internet::getURL()`, `Internet::postURL()`, and `Internet::simpleCurl()`.
- Deprecated the corresponding functions in `Utils`. Updating to the new functions is as simple as replacing `Utils` with `Internet`, since this doesn't break backwards compatibility.
The deprecations should be catered for by plugin developers. These deprecated redirects will be removed no later than 4.0.0.
2018-07-25 15:51:18 +01:00
1464487945
Utils: remove unnecessary do...while(false) from getIP()
2018-07-24 16:33:03 +01:00
b01b477a2a
Properly fixed newline issues when parsing doc comments
...
fixes #2110 properly
fixed @notHandler and such not being detected when CRLF is used
2018-07-10 12:46:20 +01:00
c4c6c58615
Added some missing typehints
2018-06-10 17:18:55 +01:00
3725bea3e5
AsyncPool: Slightly reduce worker memory usage with more conservative start options
...
this results in a memory footprint reduction of maybe 4MB for a total of 8 workers. Not much, but it's something.
2018-06-10 10:18:07 +01:00
73e56c8a36
Utils: Make kill() use static MainLogger instead of global variable
2018-06-07 09:29:53 +01:00
34b8557094
Moved parseDocComment from PluginManager to Utils
2018-05-13 11:24:04 +01:00
ac5a91b67e
Cleaned up bool comparison mess
2018-03-19 14:10:55 +00:00
6a996611f8
Move functions from PocketMine.php to Utils
...
This cleans a lot of mess out of the bootstrap file, and also has the added bonus that threads which do not inherit functions can now get access to them by autoloading Utils.
2018-02-19 11:56:22 +00:00
10f597cd64
Stop hardcoding "PocketMine-MP" everywhere
2017-09-25 18:17:35 +01:00
5190d9c1e2
Fixed possible issue with JWT decoding
...
this is url-encoded, these characters should be replaced before base64_decode()ing. Not sure how this didn't get noticed before now.
2017-09-22 19:52:08 +01:00
77cd8e7799
More broken mess to spawn 1.2
2017-08-06 17:21:51 +01:00
dbb92096e4
More typehints, documentation fixes and static analysis cleanup
2017-07-15 12:12:06 +01:00
c3b8be3f60
and more typehints
2017-07-14 10:56:51 +01:00
2a7b736f18
Heap of bugfixes, cleanup and PHP 7 upgrades
2017-07-13 19:18:56 +01:00
4d874e7e78
static analysis
2017-07-13 16:45:24 +01:00
a365c831a8
Fixed some doc problems
2017-06-25 12:07:28 +01:00
6a2a74a457
Improved git hash handling, add dirty git detection and disable automatic reporting for dirty builds
2017-06-22 13:35:04 +01:00
75cc2d6914
Cleaned up Utils::getIP(), resolved strict-type issues, close #1062
2017-06-11 10:25:48 +01:00
51b0673b4b
Bite the bullet and enable strict types on everything
2017-06-07 12:53:16 +01:00
5a9b5db103
Better cURL API, use async in timings ( #834 )
...
* Improved cURL functions
* Created BulkCurlTask
* Use asynchronous cURL posting in /timings paste
Closes #509
2017-04-25 11:52:18 +01:00
bcbb5de5bb
Added reference parameters for errors for Utils::getURL() and Utils::postURL(), close #332 ( #357 )
2017-03-16 19:15:31 +00:00
085d1a1359
Remove deprecated Utils::getRandomBytes()
2017-01-11 11:53:54 +00:00
175dd0efa6
PhpStorm inspections
...
Fixed some minor bugs and dropped some obsolete code
pocketmine\level\generator namespace is ignored in this commit
2016-12-14 21:49:35 +00:00
8e9a078ff9
Use built-in random_bytes functionality
2016-09-06 11:47:58 +01:00
ed9888a2cb
Fixed #3963 , closes #3979 , added hash for non-numeric seeds
2016-02-22 19:40:40 +08:00
a2734f6dc0
Merged master into php7 to support 0.13.1
2016-01-22 17:36:45 +01:00
c3e756a712
Merge branch 'patch-19' of https://github.com/PEMapModder/PocketMine-MP into PEMapModder-patch-19
2015-12-20 00:30:53 +01:00
815411968b
Silence the ifconfig not found message
2015-11-20 00:34:29 +08:00
3ffdb8e552
Removed @deprecated classes, methods and properties, added some type hints
2015-09-12 17:10:11 +02:00
244cef3b00
. <-- descriptive commit ftw!
2015-08-23 00:25:30 +02:00
b47cebb1d5
PHP7 changes
2015-08-23 00:25:30 +02:00
5621ab0c49
Updated some packets for 0.12, UUIDs, other stuff!
2015-08-02 01:22:36 +02:00
4e76c30788
Update Utils.php
...
Correct a typo
2015-06-17 08:39:18 +03:00
33e312c7d0
Added extra memory reportings (heap, stack), stop tasks faster, added extra timeouts fro ServerKiller
2015-06-13 15:37:02 +02:00
f64caf6c96
Use best method to create identifier on linux
2015-05-23 14:10:42 +02:00
46f20d36b3
Improved unique id generation for server
2015-05-21 12:59:33 +02:00
cde2d39029
New statistics system
2015-05-21 11:41:11 +02:00