Skip to content

Cache discoverable items that do not change #141

Description

@hinerm

During context injection, there are method and field annotation lookups, plus event handler registration, that is repeated when the results should be consistent for a given set of input parameters.

The repetition of these queries leads to significant overhead during high loads of context injection.

Thus we should be caching these results.

Activity

  1. self-assigned this
    on Jan 26, 2015
  2. hinerm commented on Jan 26, 2015

    @hinerm
    MemberAuthor

    @dietzc @ctrueden @dscho I have a partial solution on https://github.com/scijava/scijava-common/tree/cache-annotations

    Aside from cleanup and documentation, do you think it's worth waiting to merge until we have a cache service that can manage these cached objects? Otherwise I'm worried about their endless proliferation.

    (also, the current caches are slightly wrong at the moment because of the recursion of the annotation scraping)

  3. dscho commented on Jan 26, 2015

    @dscho
    Contributor

    Hmm... I would have to spend time to wrap my head around those methods to understand the commits. Do you have any numbers about performance improvements? (If it improves how fast SCIFIO opens files, I will set aside time to review the commits, but if there are lower hanging fruits, I'd prefer to go for them first.)

  4. hinerm commented on Jan 26, 2015

    @hinerm
    MemberAuthor

    @dscho yes I do. Pretty graph is coming soon.

  5. hinerm commented on Jan 26, 2015

    @hinerm
    MemberAuthor

    Hey look, a chart

    speedup

    Results from running a 7KB .tif

  6. hinerm commented on Jan 26, 2015

    @hinerm
    MemberAuthor

    Force pushed my latest changes, which I believe are now correct, and improve the Cache-Fixes times slightly.

  7. hinerm commented on Jan 27, 2015

    @hinerm
    MemberAuthor

    OK I'm happy with this now that I have semi-consolidated the getAnnotatedMethods and getAnnotatedFields logic in a way that allows for arbitrary annotation:object scrapings in a single recursion operation.

    @ctrueden if you get a chance can you sign off on this? Since it's a low-level change I want another pair of eyes on it.

  8. ctrueden commented on Jan 27, 2015

    @ctrueden
    Member

    Wrote a bunch of comments! (They would be visible here had you filed a PR like normal people do. 😛)

  9. hinerm commented on Feb 4, 2015

    @hinerm
    MemberAuthor

    Continuing my trend of not acting like a normal person, I did not make a merge commit that closed this issue!

    So instead, see these commits which resolved this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions