Project

General

Profile

Actions

bug #10418

closed

Thumbnail loading takes very long in taxon search

Added by Andreas Müller 11 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
cdm-dataportal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
major
Found in Version:
Tags:

Description

AM:

ich bin gerade zufällig über folgendes gestolpert:

Wenn ich bei Cichorieae nach Crepis bungei suche, egal ob auf production oder test braucht der webservice call auf der Suchseite für media/2e88b394-b851-4b16-88e6-fe7d90c22e5d ca. 60 s . In der Zeit wird auch kein Suchergebnis angezeigt. Das ist natürlich super kritisch. Ich hätte erwartet, dass die Bilder auch in der Suche asynchron geladen werden.

Weißt du da mehr? Gibt es evtl. ein Ticket?

https://int.e-taxonomy.eu/dataportal/integration/cichorieae/cdm_dataportal/search/results/taxon?ws=portal%2Ftaxon%2FfindDto&query=Crepis+bungei&form_build_id=form-0mVOajpYjEfKqCxyaYdVcIJ7vM8MVdsENBCZITA8OZY&form_token=m28rB8ucvdCxdTbJ6y44wEpqXAn8CKyb770rhs8DINQ&form_id=cdm_dataportal_search_taxon_form&search%5BdoTaxaByCommonNames%5D=1&search%5BdoMisappliedNames%5D=1&search%5BdoSynonyms%5D=1&search%5BdoTaxa%5D=1&search%5BpageSize%5D=25&search%5BpageIndex%5D=0

or

https://int.e-taxonomy.eu/dataportal/integration/cyprus/cdm_dataportal/search/results/taxon?ws=portal%2Ftaxon%2FfindDto&query=Allium_guttatum_subsp._guttatum&form_build_id=form-Y-0BMxpFjolCw7JNtfoLxLxtxm7rRqw4AruhKezVaLg&form_token=3fVP8VKvXpQhydJzppoviXSjF9GgtfAp0n2k3WpQ0as&form_id=cdm_dataportal_search_taxon_form&search%5BdoTaxaByCommonNames%5D=1&search%5BdoMisappliedNames%5D=1&search%5BdoSynonyms%5D=1&search%5BdoTaxa%5D=1&search%5BpageSize%5D=25&search%5BpageIndex%5D=0

(interesting here is that the image does not exist on the media server but still it takes so long)

or

https://int.e-taxonomy.eu/dataportal/integration/cichorieae/cdm_dataportal/search/results/taxon?ws=portal%2Ftaxon%2FfindDto&query=Lactuca_triquetra&form_build_id=form-n3rCq18Exsx0CYtymurTHecF2HZ8CBm64gKkZ7ffrN8&form_token=m28rB8ucvdCxdTbJ6y44wEpqXAn8CKyb770rhs8DINQ&form_id=cdm_dataportal_search_taxon_form&search%5BdoTaxaByCommonNames%5D=1&search%5BdoMisappliedNames%5D=1&search%5BdoSynonyms%5D=1&search%5BdoTaxa%5D=1&search%5BpageSize%5D=25&search%5BpageIndex%5D=0

Here the problem was, that the images weren't available anymore. I adapted the uris and now the search is much faster.


Files

clipboard-202310201122-hx5jk.png (72.1 KB) clipboard-202310201122-hx5jk.png Andreas Müller, 10/20/2023 11:22 AM

Related issues

Related to EDIT - bug #10181: Search images do not show thumbnailsClosedKatja Luther

Actions
Related to EDIT - bug #9979: Flora Greece shows large images ResolvedAndreas Müller04/25/202204/29/2022

Actions
Related to EDIT - bug #10472: Improve simple search performance in dataportalResolvedAndreas Müller

Actions
Actions #1

Updated by Andreas Müller 7 months ago

  • Target version changed from Release 5.49 to Release 5.47
Actions #2

Updated by Andreas Müller 3 months ago

  • Related to bug #10181: Search images do not show thumbnails added
Actions #3

Updated by Andreas Müller 3 months ago

  • Related to bug #9979: Flora Greece shows large images added
Actions #4

Updated by Andreas Müller 3 months ago

  • Related to bug #10472: Improve simple search performance in dataportal added
Actions #5

Updated by Andreas Müller 3 months ago

  • Status changed from New to In Progress
  • Assignee changed from Katja Luther to Andreas Müller
  • Target version changed from Release 5.47 to Release 5.43
Actions #6

Updated by Andreas Müller 3 months ago

  • % Done changed from 0 to 10

Images are not loaded asychronously like in the image gallery. Each image is loaded separately.

Actions #8

Updated by Andreas Müller 3 months ago

The webservice for fetching the media metadata (metadata + link to file) is very fast, so these service calls are not critical (though they could maybe be done within one call and not with separate calls).

E.g. https://int.e-taxonomy.eu/cdmserver/integration_cichorieae/media/2e88b394-b851-4b16-88e6-fe7d90c22e5d.json

Actions #9

Updated by Andreas Müller 3 months ago

  • Assignee changed from Andreas Müller to Katja Luther
Actions #10

Updated by Andreas Müller 3 months ago

  • Target version changed from Release 5.43 to Release 5.44
Actions #11

Updated by Andreas Müller 3 months ago

  • Description updated (diff)
Actions #12

Updated by Andreas Müller about 2 months ago

  • Target version changed from Release 5.44 to Release 5.46
Actions #13

Updated by Andreas Müller about 2 months ago

  • Target version changed from Release 5.46 to Release 5.45
Actions #14

Updated by Katja Luther about 2 months ago

Media handling during the simple search is a little bit strange, in a first step the method _load_media_for_taxon() is called, which gets all media defined in portal settings (from accepted, specimen etc)
In a second step for every of these media a ws to get the complete media object is called.
Maybe we should think about to merge these two steps? Or the first step should only return a list of uuids.

Actions #15

Updated by Katja Luther about 2 months ago

The algorithm to get the best matching representation of a file seems to be not deterministic. Running the search several times, returns different representations of the image.

Actions #16

Updated by Katja Luther about 1 month ago

  • Description updated (diff)
Actions #17

Updated by Andreas Müller about 1 month ago

Here the problem was, that the images weren't available anymore. I adapted the uris and now the search is much faster.

But why does a not existing image make the loading slow? Can't we improve this. In theory a missing image should be faster as there are no data to load.

Actions #18

Updated by Andreas Müller about 1 month ago

Katja Luther wrote in #note-15:

The algorithm to get the best matching representation of a file seems to be not deterministic. Running the search several times, returns different representations of the image.

Can you leave a note where to find this alogithm?

Actions #19

Updated by Katja Luther about 1 month ago

Andreas Müller wrote in #note-18:

Katja Luther wrote in #note-15:

The algorithm to get the best matching representation of a file seems to be not deterministic. Running the search several times, returns different representations of the image.

Can you leave a note where to find this alogithm?

filterAndOrderMediaRepresentations in MediaUtils, called by findPreferredMedia contained also in MediaUtils ...

Short summary of what is done:

  • Depending on the rules in the preferences temporary representations are created
  • these representations are filtered by mimetype and sorted by distance to the requested size or height/width
Actions #20

Updated by Katja Luther about 1 month ago

Andreas Müller wrote in #note-17:

Here the problem was, that the images weren't available anymore. I adapted the uris and now the search is much faster.

But why does a not existing image make the loading slow? Can't we improve this. In theory a missing image should be faster as there are no data to load.

But this is a problem of the server containing the image, isn't it?

Actions #21

Updated by Katja Luther about 1 month ago

  • Status changed from In Progress to Resolved

Now the thumbnail representation is used for the search display and only one call to get the media, so the loading is faster and we can close this ticket.

Actions #22

Updated by Katja Luther about 1 month ago

  • Assignee changed from Katja Luther to Andreas Müller
Actions #23

Updated by Andreas Müller about 1 month ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 10 to 100

Thumbnail loading is much faster now in search.

Actions

Also available in: Atom PDF