-
Notifications
You must be signed in to change notification settings - Fork 557
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
Add hash mechanism and speed up process large ASN.1 files #237
Conversation
Hash is implemented by ternary tree internally.
Use hash mechanism.
Use hash mechanism.
Use hash mechanism.
For people who is interesting in typical profiling result. gprof result of asn1c (with pull request 237) processing rrc-7.1.0.asn1 |
Implemented slightly differently, but thanks for prompting! On rrc-7.1.0:
|
Hi @vlm, The
|
Sorry for my previous wrong finding. Please ignore that message. Below is the correct reason and solution of crash :
|
Yeah, this fixes the crash! |
For larger ASN.1 file, e.g. @vlm's hash implementation takes :
and this pull request implementation takes :
Perhaps there still be something worthy improved in @vlm's hash implementation. |
Add hash mechanism and modify code to speed up processing of large ASN.1 file.
Before applying this PR, it takes over 75 minutes to process
rrc-7.1.0.asn1
and after applying this PR, it takes less than 2 minutes.
The reason that it's so slow to processing large ASN.1 file is we have many duplicate check mechanism implemented in various development stages. And name lookup in imported modules need to be done.
We can continue this improvement of processing time by combining duplicate check in future.
And there might be other places can be speed up by introducing hash mechanism.