Skip to content
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

GET /mappings: Performance issues with direction=both #221

Open
stefandesu opened this issue Nov 18, 2024 · 0 comments
Open

GET /mappings: Performance issues with direction=both #221

stefandesu opened this issue Nov 18, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@stefandesu
Copy link
Member

Now that direction=both is functionally fixed (see #219), it seems like using it is a far more expensive operation than combining direction=forward and direction=backward. Example:

https://coli-conc.gbv.de/api/mappings?properties=annotations&from=http://dewey.info/class/100/e23/|http://uri.gbv.de/terminology/sdnb/100|http://uri.gbv.de/terminology/bk/08.33|http://rvk.uni-regensburg.de/nt/CC%202500|http://rvk.uni-regensburg.de/nt/CI%201100|http://rvk.uni-regensburg.de/nt/CC%202600&toScheme=http://bartoc.org/en/node/486|http://bartoc.org/en/node/732|http://bartoc.org/en/node/1051|http://bartoc.org/en/node/335|http://bartoc.org/en/node/1031|http://bartoc.org/en/node/528|http://bartoc.org/en/node/313|http://bartoc.org/en/node/241|http://bartoc.org/en/node/20049|http://bartoc.org/en/node/430|http://bartoc.org/en/node/18785|http://bartoc.org/en/node/533|http://bartoc.org/en/node/20447|http://bartoc.org/en/node/20446&cardinality=1-to-1&direction=forward

takes 100-150ms (returning 22 results).

https://coli-conc.gbv.de/api/mappings?properties=annotations&from=http://dewey.info/class/100/e23/|http://uri.gbv.de/terminology/sdnb/100|http://uri.gbv.de/terminology/bk/08.33|http://rvk.uni-regensburg.de/nt/CC%202500|http://rvk.uni-regensburg.de/nt/CI%201100|http://rvk.uni-regensburg.de/nt/CC%202600&toScheme=http://bartoc.org/en/node/486|http://bartoc.org/en/node/732|http://bartoc.org/en/node/1051|http://bartoc.org/en/node/335|http://bartoc.org/en/node/1031|http://bartoc.org/en/node/528|http://bartoc.org/en/node/313|http://bartoc.org/en/node/241|http://bartoc.org/en/node/20049|http://bartoc.org/en/node/430|http://bartoc.org/en/node/18785|http://bartoc.org/en/node/533|http://bartoc.org/en/node/20447|http://bartoc.org/en/node/20446&cardinality=1-to-1&direction=backward

(the same request backwards) also takes 100-150ms (returning 56 results).

https://coli-conc.gbv.de/api/mappings?properties=annotations&from=http://dewey.info/class/100/e23/|http://uri.gbv.de/terminology/sdnb/100|http://uri.gbv.de/terminology/bk/08.33|http://rvk.uni-regensburg.de/nt/CC%202500|http://rvk.uni-regensburg.de/nt/CI%201100|http://rvk.uni-regensburg.de/nt/CC%202600&toScheme=http://bartoc.org/en/node/486|http://bartoc.org/en/node/732|http://bartoc.org/en/node/1051|http://bartoc.org/en/node/335|http://bartoc.org/en/node/1031|http://bartoc.org/en/node/528|http://bartoc.org/en/node/313|http://bartoc.org/en/node/241|http://bartoc.org/en/node/20049|http://bartoc.org/en/node/430|http://bartoc.org/en/node/18785|http://bartoc.org/en/node/533|http://bartoc.org/en/node/20447|http://bartoc.org/en/node/20446&cardinality=1-to-1&direction=both

(the same request with direction=both) takes ~23 seconds (returning the expected 78 results).

I would consider this a bug, as it shouldn't take more than the added times of the first two requests. I will need to investigate this.

@stefandesu stefandesu added the bug Something isn't working label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant