[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Speed up citation
- Subject: [EP-tech] Speed up citation
- From: jens.vieler at id.uzh.ch (jens.vieler at id.uzh.ch)
- Date: Wed, 24 Feb 2016 13:51:27 +0100
we're building a new cgi/export-plugin solution to support publication
lists in our web. Doing some searches, building some lists,
remainder/union/intersect them together, and finaly, we export a kind of
XML, including metadata and a citation.
Actually everything works quite well, BUT if the result turns into long
lists, we are running into performance problems.
We did some benchmarking and here is the result over a typically
- building up the result needs 15 sec.
- search and generate lists 0.015sec
- merge lists 0.08sec
- generation of export data 14sec
congrats: dealing with search and lists is very fast within eprints :-)
so we took a closer look at what happens while building the output.
first of all: it grows linearly with the use of render_citation.
1 time '$citation = EPrints::Utils::tree_to_utf8($dataobj->
render_citation("default"));' takes 14sec
2 times '$citation = EPrints::Utils::tree_to_utf8($dataobj->render_citation
("default"));' takes 29sec
4 times '$citation = EPrints::Utils::tree_to_utf8($dataobj->render_citation
("default"));' takes 54sec
second: it speeds up while reducing the citation XML file (default) to a
minimum; when it only includes the title, the export needs 2sec for 1000
So my question is: Is there a way to speed up render_citation? Does it
always interpret the whole citation XML file? Has anybody thought about a
way to compile the XML to a perl routine or cache things like this?
Any help is welcome
mail: jens.vieler at id.uzh.ch
phone: +41 44 63 56777
-------------- next part --------------
An HTML attachment was scrubbed...