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

Cache all package manifest on startup #103

Merged
merged 3 commits into from
Sep 12, 2019
Merged

Commits on Sep 12, 2019

  1. Cache all package manifest on startup

    So far in each request to search or categories all manifest had to be reread from disk each time. As the packages do not change during the runtime of the service, this is not necessary and all can be cached on startup of the service and kept in memory. Even if there are one day 10000 packages and each manifest is 1KB, this would only consume ~10MB of memory (currently manifest are only about 250 Bytes). Using 10MB of memory instead of 10000 file read on each request seems worth it.
    
    The code was also modified to in general pass a copy of the packages instead of using a reference. This makes sure even if a request modifies the packages locally, the global package list is not modified.
    ruflin committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    b880ca1 View commit details
    Browse the repository at this point in the history
  2. add changelog entry

    remove requirement to use reference for IsNewer. Not needed
    
    simplify magefile by introducing also GetPackages
    
    make getPackagePaths private
    ruflin committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    80b343e View commit details
    Browse the repository at this point in the history
  3. add proper license headers

    ruflin committed Sep 12, 2019
    Configuration menu
    Copy the full SHA
    060ed2e View commit details
    Browse the repository at this point in the history