-
Notifications
You must be signed in to change notification settings - Fork 14
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 up parsing #14
Comments
Well, too bad: I implemented the parser in NPeg today, but the compiler does not agree when running at compile time:
|
Ok, mistake: I was running an old Nim version, but this has recently been fixed on devel. Parser works at compile time. |
But only for devel? Have you tried the parser with any more complicated protobuf files? |
Quoting PMunch (2019-11-13 10:36:13)
But only for devel?
Only for devel - will not work for 1.0.2 or earlier because of
VM limitations.
Have you tried the parser with any more complicated protobuf files?
Well, it parses stuff I feed it, but I'm not sure if I'm properly
parsing into your AST yet - that will probably require a bit more
love and attention to get right. Not sure if it makes sense to spend the
time on that now given that the Nim VM also has a hard time with
running this parser in the VM....
…--
:wq
^X^Cy^K^X^C^C^C^C
|
I love the concept and usage of this library! But I noticed this issue, so I thought I'd post here. I was trying to use this to decode a fairly large byte array (51x512), but the results are unusable. It takes 2ms to read data off the socket into a string, then another 90ms (!) to parse.
|
Do you have a test case? This should really be it's own issue though. The original issue is about the speed of parsing the protoc files and not about the runtime speed. |
And @zevv, do you still have that NPEG parser lying around? Probably works with the latest Nim versions so this could finally be implemented. |
Quoting PMunch (2021-10-29 14:15:19)
And @zevv, do you still have that NPEG parser lying around? Probably works with the latest Nim versions so this could finally be implemented.
Apart from an ancient vim undo file at /home/ico/.vim_undo/%home%ico%sandbox%prjs%npeg%protobuf.nim,
nothing to be found on my machine :(
|
And nothing useful in that file? Bummer.. |
Combparser turns out to be fairly slow. This is probably caused by it's very recursive nature and lot's of string slicing (which creates a new copy of the string). As a means to fix this either combparser need to be sped up by improving how it handles strings internally, or a new parser needs to be written/implemented.
The text was updated successfully, but these errors were encountered: