Changes between Initial Version and Version 1 of Ticket #11216, comment 22


Ignore:
Timestamp:
2015-03-20T16:06:35+01:00 (9 years ago)
Author:
wiktorn

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11216, comment 22

    initial v1  
    22> LinkedBlockingDeque rejects new elements, rather than dropping the oldest. I doubt this the intended behavior. Also keep in mind that this is mostly depends on the screen resolution. For example on a large 1600x2560 screen, you can have up to 77 tiles at one time. What we could do instead, is drop requests that are off screen, after the user panned or zoomed. (Probably for another ticket.)
    33
    4 Indeed. But there is no queue implementation within Collections Framework, that have this behavior, and I found that implementing it on my own, would gain little improvement. Current queue size is 5 elements (compared to 77 tiles on screen is really small) and with current redraw politics, that finishing download of a tile generates a redraw event in near future (100ms), i see that threads are constantly busy downloading tiles, although I have quite fast connection. So actually - the main queue are the tiles, that are struggling to get painted, instead of queue within Executor.
     4Indeed. But there is no queue implementation within Collections Framework, that have this behavior, and I found that implementing it on my own, would gain little improvement. Current queue size is 5 elements (compared to 77 tiles on screen is really small) and with current redraw politics, that finishing download of a tile generates a redraw event in near future (100ms), I see that threads are constantly busy downloading tiles, although I have quite fast connection. So actually - the main queue are the tiles, that are struggling to get painted, instead of queue within Executor.
    55
    66Long LIFO queue (say 100 or 1000 jobs), with enforcement of maximum size, that would remove objects on the bottom of the stack, would result in a behavior, that shown tiles are downloaded first what is good, but then, in background, we would be downloading tiles, that user is not seeing at all (as he changed the zoom or panned away from this tiles).
     7
     8So I recommend to leave it for now as it is.
     9
     10What we can change is whether we should stay with constant queue size of 5, or somewhere between 0.5 and 1.5 of `THREAD_LIMIT`