#345 plugin annotate() called multiple times

open
Lincoln Stein
Gbrowse (196)
5
2010-12-10
2010-12-01
Anonymous
No

I have been debugging a custom annotator plugin and noticed some behavior that might be a GBrowse 2 bug.

The annotate() method of my plugin is getting called twice when the GBrowse webpage is reloaded in full or when I click on the search button, but only once at other times, like when I navigate around with the arrow buttons or change zoom level.

I traced this to calls to external_data() in Bio::Graphics::Browser2::Render from both background_track_render() and featurefiles_in_section(), and an undiagnosed condition that causes loss the cache of feature files in $self->{feature_files} following a search or full page rendering.

When reloading the browser window, the first featurefiles_in_section() call made in overview_tracks() successfully saves the feature file cache, but this is lost when background_track_render() runs.

When navigating via the arrow buttons, a call to background_track_render() is made first, but the feature file cache created here is accessible by all other methods called to render a new segment view.

I've been testing this with only one annotator plugin active and no remote sources loaded, and encounter the same behavior with Gbrowse 2.13 and 2.15.

I do notice that I am sporadically also getting session lock timeout when reloading the page, but this does not happen all the time, whereas the above behavior is consistently reproducible. We're currently running with the default session parameters.

Any input is appreciated. This plugin currently calls an external URL for data, so we're hitting that external resource multiple times to render a single view, and that's obviously not advantageous...

Discussion

  • Scott Cain
    Scott Cain
    2010-12-10

    • assigned_to: scottcain --> lstein