Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introducing the ultra-fast braindead JSON parser
This parser only handles hashes, arrays and strings and will return Nil if *anything* goes wrong. It is now plugged into "R:I:JSON.from-json" to first attempt the very fast parser: of that fails, fall back to the original, slow, grammar based parser. How much faster: at least 10x faster!
- Loading branch information
Showing
1 changed file
with
95 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16ce9c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing the point -- zef has to parse 1MB+ json array of hashes containing meta6 data, not parse 1000+ individual META6.json files. e.g. if a single module in an ecosystem requires the fallback then zef will not see any speed improvement.
16ce9c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was not clear to me, sorry.
Is there a place where I could get that 1MB JSON file to run tests on?
16ce9c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps not the right place to ask. But why is it a single JSON file, and not many separate ones? If they were separate ones, we could probably
race
the creation of the internal representation?16ce9c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found the file
16ce9c8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My take on it: ugexe/zef#273