-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed of \JsonMachine\JsonMachine::fromFile #1
Comments
Hello. Yes, it seems normal for most PCs. If The main advantage of this package is constant memory consumption and quite constant speed. Of course the speed can't mostly measure with native implementation, but that's not the goal. The goal is to be memory efficient on JSON streams of any length. In terms of speed, By the way, 5x slower than native (in your case) is not that bad. With JSON files with size of 100 MB and up it is sometimes even faster than |
The delay is actually caused by the foreach, which is due to the 27 thousand objects. I'll try to cut down on the amount of data in each object to make it more efficient. |
Take a look at |
Closing as not a bug for now. |
This might be of help #97 |
Hi!
Is it normal for a response to take 8-9 seconds on a 32MB file? When using json_decode, it was maybe a second or two (at the cost of resources).
I am simply using
$array = \JsonMachine\JsonMachine::fromFile($file);
and matching an email with foreach to return all objects containing that email (usually 5-10 objects and 20kB or so).
Cheers
The text was updated successfully, but these errors were encountered: