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

Code generation story #36

Closed
davidanthoff opened this issue Jan 8, 2018 · 2 comments
Closed

Code generation story #36

davidanthoff opened this issue Jan 8, 2018 · 2 comments
Labels
Milestone

Comments

@davidanthoff
Copy link
Member

I've been thinking a bit more about the code generation story. Do you think it might make sense to generate the code from the schema in the build.jl function and just save to disc as .jl files? One benefit I could see is that the package would probably load a lot faster because the code generation would only happen once at package install time, not at every package load time. It might also be easier to fully understand everything that gets generated? There is probably some downside, but I can't really think of any right now?

@fredo-dedup
Copy link
Collaborator

I recently noticed that the slow load time of VegaLite was partly due to the using FileIO which takes about half the time ! Problem seems to be this one : JuliaIO/FileIO.jl#156 itself caused by an inference regression in Julia . Another symptom is a large precompiled .ji file : FileIO.ji is 7.6Mb on my desktop.
If this problem gets solved this will really reduce the pain of loading VegaLite.

@fredo-dedup
Copy link
Collaborator

If we decide to do something about slow load times anyway, something we could try (besides the codegen idea you pursued) is to build the rootSpec in build.jl, serialize it and save it to a file. This might improve things : using FileIO is roughly 50% of load time, include("schema_parsing.jl") another 25-30%.

I'll try that if I have the time...

acheryauka pushed a commit to acheryauka/VegaLite.jl that referenced this issue Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants