#6797 closed defect (fixed)
Loading of http:// images blocks user input. It should be done in background
Reported by: | bastiK | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 14.01 |
Component: | Core | Version: | |
Keywords: | background | Cc: |
Description (last modified by )
...continued from #6137.
At the moment, we load images in EDT. When there is delay in the network, the user interface may block for some time. Instead, we should fetch the images asynchronously in a background thread.
Attachments (3)
Change History (17)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Replying to cmuelle8:
Replying to bastiK:
- First the preliminary icon is shown on the map, but when loading is finished, no repaint is done.
In MapPainter.java, function drawNodeIcon(), line
icon.paintIcon ( nc, g, [...]nc is used as a Component implementing ImageObserver. Maybe we can leverage this and use AWT functionality for asynchronous image loading, no need to write code twice.
Sure, whatever works best. No need to force it, though.
by , 13 years ago
Attachment: | async.diff added |
---|
comment:5 by , 13 years ago
Description: | modified (diff) |
---|
First version. Should work, but is there a better (simpler) way to do this?
by , 13 years ago
Attachment: | async2.diff added |
---|
comment:6 by , 13 years ago
Improved version.
FIXME: Text label position is not updated when the image is loaded and the final image is smaller or larger than the dummy image.
comment:10 by , 12 years ago
Keywords: | background added |
---|
comment:12 by , 11 years ago
Replying to bastiK:
FIXME: update disabled image cache
Is there still something to do or can we close this ticket ?
Replying to cmuelle8:
You are right, it can be fixed relatively easy. The name is not enough, because there can be multiple zip archives that contain icons with the same name. See MapPaintStyles.IconReference class for a full description. My point was, that the patch doesn't quite work like this, but there is more to do...