Skip to content
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

pre-compile parser objects for performance #15

Closed
rbuels opened this issue Apr 23, 2019 · 4 comments
Closed

pre-compile parser objects for performance #15

rbuels opened this issue Apr 23, 2019 · 4 comments

Comments

@rbuels
Copy link
Contributor

rbuels commented Apr 23, 2019

in RequestWorker, at least, I noticed that there are a lot of de-novo constructions of Parser objects. these are expensive, because they compile javascript every time they are created.

could probably get a significant performance boost if these were compiled globally and reused.

@rbuels
Copy link
Contributor Author

rbuels commented Apr 23, 2019

https://github.com/GMOD/cram-js/blob/master/src/cramFile/sectionParsers.js is one not-terribly-clean example of doing this

@cmdcolin
Copy link
Collaborator

I went ahead and did this in the requestworker e422584

It could be worth it to have version specific parsers but I haven't had much luck on gathering version information on bigwig files

@cmdcolin
Copy link
Collaborator

Close for now, version info following #16

@rbuels
Copy link
Contributor Author

rbuels commented Apr 24, 2019

this probably helps, but i might even take it further and pre-compile them in a module and just export them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants