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

only load project that is requested #172

Open
grosser opened this issue Aug 25, 2022 · 4 comments
Open

only load project that is requested #172

grosser opened this issue Aug 25, 2022 · 4 comments

Comments

@grosser
Copy link
Owner

grosser commented Aug 25, 2022

atm we always load all projects which takes a few seconds, would be nice to avoid that
autoload parts ... load only project when project.rb project/project.rb project_foo -> project/foo.rb exists

expected savings: ~1s (tried by hardcoding the correct require) (1.6s -> 0.5s to run generate)

we'd need to store a project -> file(s) map to make this work, maybe store after running generate
alternatively it could just support projects with the exact right path and fallback to all for the rest, but given our current messy project layout that would be almost nobody

@zdrve
Copy link
Collaborator

zdrve commented Sep 25, 2022

With the current filtering mechanisms, that is going to rely on introducing a new restriction: that the kennel_id of a project must match (1:1 reversible) the class / filename.

@grosser
Copy link
Owner Author

grosser commented Sep 25, 2022

yeah, that will be hard
we could say "it needs to be either in x.rb or x/x.rb" etc to be flexible but it's not going to be super reliable

@zdrve
Copy link
Collaborator

zdrve commented Sep 25, 2022

Would be perhaps pretty straightforward with the generated_from concept: https://github.com/zdrve/kennel/pull/1

@grosser
Copy link
Owner Author

grosser commented Sep 26, 2022 via email

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