inventaire-client icon indicating copy to clipboard operation
inventaire-client copied to clipboard

scan and importer make doublon requests

Open jum-s opened this issue 2 years ago • 0 comments

as stated in server PR #654, it seems like doublon requests ie. (/api/entities?action=by-uris&uris=isbn:9782738108074&refresh=false&autocreate=true) are sent when a user scans barcodes and validate quickly enough, so that the first request (sent by precachingEntityData) didnt finish to autocreate the entity. Then, the importer (through the resolver) redo the query (ie. /api/entities?action=by-uris&uris=isbn:9782738108074&refresh=false&relatives=wdt:P629|wdt:P50&autocreate=true).

Despite memoize in place server side (which prevents creating two entities with the same isbn), it would make a performance improvement to not refetch the new entity again.

jum-s avatar Oct 02 '22 14:10 jum-s