-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout when opening a vocabulary #46
Comments
I agree that 1000 records are a lot, but are a lot of pages with a smaller number of records each really that much better? I'd rather scroll than click through dozens of pages. Pagination for the top concepts would also make other things (in particular showing a certain concept in its context, i.e. the hierarchy) a lot more complicated. I wonder why the request takes that much time anyway. 43 seconds (during my last test) seems a lot to me for a request that should be trivial (and indexed). And the data transferred is not that much either (410 kB compressed). In general, I noticed during development that a lot of requests to DANTE take unreasonably long if not in cache. When I hooked it up to our own API based on jskos-server, everything felt 10 times faster (because most requests are fulfilled near instantly). |
Pagination as layout is independent from paginated queries. The list can also be shown as whole but loaded in batches. |
Some properties, in particular `mappings`, cause longer loading times in requests to DANTE. Removing them in all requests besides getConcepts reduces those loading times, though it will introduce a small loading period for each concept. See also: #46
Mappings and other additional data are now only loaded when a particular concept is selected (so far only in Dev). This should reduce loading times enough so that this is less of a problem. I do like the idea of loading the list in batches. This would make it usable quickly while additional items are loaded in the background. I can look into it. |
When I open a vocabulary, all records at top level are fetched via /top
Example: https://uri.gbv.de/terminology/http%3A%2F%2Fet-iblk.org%2Fscheme%2F/ (https://uri.gbv.de/terminology/etiras/) calls
https://api.dante.gbv.de/voc/top?properties=%2Bcreated,issued,modified,editorialNote,scopeNote,note,definition,mappings,location&limit=10000&uri=http:%2F%2Fet-iblk.org%2Fscheme%2F&language=en,de,fr,es,nl,it,fi,pl,ru,cs,jp
If this is not in the cache, it will take some time and will be aborted. There seems to be a timeout. To simulate the timeout, you could add the parameter cache=0 to the query. The maximum limit for dante-api is 1000. No need for 10.000.
Of course, a smaller query would be better, because no one can look at 1000 data records in the small scroll window anyway. Even better: pagination. :-)
The text was updated successfully, but these errors were encountered: