Project

General

Profile

bug #8129

Load images asynchronously in media details view

Added by Andreas Müller 8 months ago. Updated 3 months ago.

Status:
Feedback
Priority:
Highest
Category:
taxeditor
Target version:
Start date:
02/22/2019
Due date:
% Done:

50%

Severity:
normal
Found in Version:
Tags:

Description

Loading images takes often very long if full size images with e.g. ~10MB are involved. Currently the TaxEditor becomes unresponsive during load which makes editing images very cumbersome. We need to load images asynchronously (same as in dataportal).

This also holds for the image gallery view if "show thumbnails" is switched on (but hopefully there only thumbnail images are loaded if available - I did not check).


Related issues

Related to Edit - bug #8126: Mediarepresentations should not be shown in Referencing objects view New 02/22/2019
Related to Edit - bug #7711: Bugs in media gallery New 08/31/2018
Related to Edit - bug #7732: layout issues for the media details view New 09/06/2018
Related to Edit - feature request #8283: Allow adding media to terms in taxeditor Closed 05/17/2019
Related to Edit - bug #8367: Advanced media view is not available for term media New 07/15/2019

Associated revisions

Revision ca1b4808 (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 Load images asynchronously in media details view

Revision 47c992a7 (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 Fix image disposing

  • refactoring

Revision 1ab658e8 (diff)
Added by Patrick Plitzner 3 months ago

ref #8011, #8129 Fix possible NPEs when media URI can not be resolved

Revision 6f1e2526 (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 Fix refresh bug when adding a new empty media to a term

Revision 1ce04105 (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 Load images asynchronously in advanced media view

Revision 45272f9d (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 minor refactoring

Revision 663f4308 (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 Fix potential NPE

Revision a63beab2 (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 Handle all exceptions

Revision 3b069ad4 (diff)
Added by Patrick Plitzner 3 months ago

ref #8129 Handel widget disposed exceptions

History

#1 Updated by Andreas Müller 8 months ago

  • Related to bug #8126: Mediarepresentations should not be shown in Referencing objects view added

#2 Updated by Andreas Müller 8 months ago

  • Related to bug #7711: Bugs in media gallery added

#3 Updated by Andreas Müller 8 months ago

  • Related to bug #7732: layout issues for the media details view added

#5 Updated by Andreas Müller 5 months ago

Also check #1072 before implementation

#6 Updated by Patrick Plitzner 3 months ago

  • Assignee changed from Katja Luther to Patrick Plitzner
  • Target version changed from Reviewed Next Major Release to Release 5.8

#7 Updated by Patrick Plitzner 3 months ago

  • Status changed from New to Resolved
  • Assignee changed from Patrick Plitzner to Andreas Müller
  • % Done changed from 0 to 50

#8 Updated by Patrick Plitzner 3 months ago

This also holds for the image gallery view if "show thumbnails" is switched on (but hopefully there only thumbnail images are loaded if available - I did not check).

I guess it it not possible to load the thumbnails asynchronously because they are part of the viewer items. If this is still a problem, please open another ticket.

#9 Updated by Patrick Plitzner 3 months ago

#10 Updated by Patrick Plitzner 3 months ago

  • Related to bug #8367: Advanced media view is not available for term media added

#11 Updated by Andreas Müller 3 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner

It seems to work only in the simple view but not in the advanced view.

As an example use rem_conf_am, bulk editor for media, search for "large". => 2 media are found.

Click on single large => async loading works

Click on test large => async loading does NOT work

#12 Updated by Andreas Müller 3 months ago

Also we may want to have a replacement image which shows "loading" or something similar while the image is loading. At the moment it is a bit unexpected that a URL exists but no image shows up.
Even a simple text field saying "loading ..." might be enought which is then replaced by the full image once loaded

#13 Updated by Patrick Plitzner 3 months ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Patrick Plitzner to Andreas Müller

Implemented asynchronous loading in advanced media view.

Opened another ticket for placeholder image -> #8378

#14 Updated by Andreas Müller 3 months ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner

Now, the media details view is always collpased and the state is not saved - at least if I choose the above mentioned "large" images in rem_conf_am and I switch between both and open expand the details view in between.

This is the case for the main section but also for the MediaRepresentationPart sections.

#15 Updated by Patrick Plitzner 3 months ago

  • Assignee changed from Patrick Plitzner to Andreas Müller

Andreas Müller wrote:

Now, the media details view is always collpased and the state is not saved - at least if I choose the above mentioned "large" images in rem_conf_am and I switch between both and open expand the details view in between.

This is the case for the main section but also for the MediaRepresentationPart sections.

This seems to be related to #8260 but it not the part of this ticket. If you expand the section is the image loaded asynchronously?

#16 Updated by Andreas Müller 3 months ago

Patrick Plitzner wrote:

Andreas Müller wrote:

Now, the media details view is always collpased and the state is not saved - at least if I choose the above mentioned "large" images in rem_conf_am and I switch between both and open expand the details view in between.

This is the case for the main section but also for the MediaRepresentationPart sections.

This seems to be related to #8260 but it not the part of this ticket. If you expand the section is the image loaded asynchronously?

Hmm, don't know if this is only related to #8260. It did not happen before adding asynchronous loading - at least not for the MediaRepresentationParts for which it is really annoying and therefore it should be fixed within this ticket.

#17 Updated by Andreas Müller 3 months ago

Hmm, sometimes it works but most often it does not. Looks like you have at least to open a new bulk editor to make it work. Does not save the state when switching the obejct within the same editor. Something I also found in name editor when switching within synonymy. But even with a new editor it does not always work.
And also after restarting the TaxEditor the state is lost again and the default seems to be that the section is not expanded.

However, the asynchronous loading has problems:

  • While loading it is not possible to enter data into the form (though actions like typing seem to be stored somewhere in memory done after loading is completed somehow)
  • if (at least in simple view) the main section is not expanded and the details view is loaded the loading of the image starts. If it is even ended before the expansion button is pressed the image is not shown afterwards
  • the size of the image is recomputed, most often the size can be computed from metadata so and empty frame could be already offered from the very beginning which makes the UI much more stable (not highest priority but still annoying)
  • when collapsing and expanding the sections the images are loaded again which does not make much sense and produces traffic, can't the images be stored within a given details view; even better would be to store the images for all data of an editor to make details view loading fast when switching between data in an editor (but with some care to not overload the main memory)

#18 Updated by Andreas Müller 3 months ago

  • Assignee changed from Andreas Müller to Patrick Plitzner

Also when switing between 2 entries in bulk editor with <2sec between switches often the entries are not selected anymore but old selects are shown in details view.

#19 Updated by Andreas Müller 3 months ago

Andreas Müller wrote:

Also when switing between 2 entries in bulk editor with <2sec between switches often the entries are not selected anymore but old selects are shown in details view.

It is even much more than 2 sec. Looks like the loading of the images (though not visible) needs to be completed before a successful switch is possible.

#20 Updated by Andreas Müller 3 months ago

The loading does not stop immediately when a new URL is entered but should. Otherwise an image is shown which does not fit to the given URL (e.g. if an extra letter is typed which does not link to an existing image still the image for the before URL is shown which suggests that the URL is correct and leads to errors)

#21 Updated by Andreas Müller 3 months ago

Please test intensively e.g. with the 2 given media if the behavior is as you would expect for rapid data entry and control.

#22 Updated by Andreas Müller 3 months ago

The expand problem seems to be solved (see #8260). Final question: what is the default. I suggest to have "expanded" as default for all 3 sections but to me it seems to be collapsed.

ALso to me it looks like we do always store the state (expanded or collapsed) and do not simply remove it if it is the default. This seems to increase the size of the pref file unnecassary. (not so high priority)

#23 Updated by Andreas Müller 3 months ago

Andreas Müller wrote:

Also when switing between 2 entries in bulk editor with <2sec between switches often the entries are not selected anymore but old selects are shown in details view.

This also seems to be much better now

#24 Updated by Andreas Müller 3 months ago

Andreas Müller wrote:

...
* the size of the image is recomputed, most often the size can be computed from metadata so and empty frame could be already offered from the very beginning which makes the UI much more stable (not highest priority but still annoying)

This to me seems to be critical to improve loading speed and UX. If the sizes of all sections are not recomputed multiple times everything will be much more smooth I guess.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)