ezpaarse-project / ezpaarse

ezPAARSE can ingest your (proxy) log files and show how users access suscribed electronic ressources.
http://www.ezpaarse.org
Other
70 stars 27 forks source link

Optimize the paquet handling in the crossref middleware #17

Closed nojhamster closed 6 years ago

nojhamster commented 9 years ago

Currently, we browse the crossref results once for each EC until we find a matching DOI, which means that we loop paquetSize / 2 times in average.

A better implementation would be to iterate once over the results to make a DOI<->Result map, and then iterate once over the ECs and use this map to merge the results. This would greatly decrease the number of loops.

tporquet commented 6 years ago

A cache mechanism has been implemented a while ago https://github.com/ezpaarse-project/ezpaarse-middlewares/commit/469527c071bceaf321e991e3680c48244d489b40#diff-eda6a9574cdb5b1d6f499e337f711fe0