commit/galaxy-central: james_taylor: trackster: fix bug with fetching same data many times by putting deferred in data cache immediately, still problematic because many deferred callbacks are queued up and the tile is drawn multiple times, debug statement demonstrates this, needs more refactoring to get it right
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/0b7a4ca37154/ changeset: r5333:0b7a4ca37154 user: james_taylor date: 2011-04-03 05:12:02 summary: trackster: fix bug with fetching same data many times by putting deferred in data cache immediately, still problematic because many deferred callbacks are queued up and the tile is drawn multiple times, debug statement demonstrates this, needs more refactoring to get it right affected #: 1 file (292 bytes) --- a/static/scripts/trackster.js Sat Apr 02 18:30:13 2011 -0400 +++ b/static/scripts/trackster.js Sat Apr 02 23:12:02 2011 -0400 @@ -314,10 +314,11 @@ } */ - // - // Load data from server. - // - return this.load_data(chrom, low, high, mode, resolution, extra_params); + // Load data from server. The deferred is immediately saved until the + // data is ready, it then replaces itself with the actual data + entry = this.load_data(chrom, low, high, mode, resolution, extra_params); + this.set_data( low, high, mode, entry ); + return entry }, set_data: function(low, high, mode, result) { //console.log("set_data", low, high, mode, result); @@ -1717,6 +1718,8 @@ var track = this; // Put a 50ms delay on drawing so that if the user scrolls fast, we don't load extra data var draw_and_show_tile = function(id, result, resolution, tile_index, parent_element, w_scale, seq_data) { + // DEBUG: this is still called too many times when moving slowly, + // console.log( "draw_and_show_tile", resolution, tile_index, w_scale ); returned_tile = track.draw_tile(result, resolution, tile_index, parent_element, w_scale, seq_data) // Wrap element in div for background Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket