Optimize Work page

Bug #551316 reported by George
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Library
Fix Released
Medium
Anand Chitipothu

Bug Description

3/22, from Anand:

Work pages were taking too long to load.

$ time curl http://upstream.openlibrary.org/works/OL61982W/Odyssey > /
dev/null
real 0m48.054s

I noticed an expensive call, output of which is used only when add-
cover link is clicked. Removing that[1] reduced the load time to
almost half.

$ time curl http://upstream.openlibrary.org/works/OL61982W/Odyssey > /
dev/null
real 0m27.655s

Running with _profile=true showed that the next overhead is is the
copy.deepcopy calls used to make copy of the object data before
creating objects and it turns out to be that is not really required.
Removing that reduced the load time quite a lot again.

$ time curl http://upstream.openlibrary.org/works/OL61982W/Odyssey > /
dev/null
real 0m17.660s

Thats all for now.

[1]: http://upstream.openlibrary.org/templates/covers/change.tmpl?m=diff&b=57

Anand

Revision history for this message
George (george-archive) wrote :

17 secs is still too long...

Changed in openlibrary:
assignee: nobody → Anand Chitipothu (anandology)
milestone: none → upstream-to-www
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Anand Chitipothu (anandology) wrote :

After adding covers to books and removing the temporary code to access coverstore, the response time has reduced considerably.

$ time curl -s http://upstream.openlibrary.org/works/OL61982W/Odyssey > /dev/null

real 0m5.970s
user 0m0.010s
sys 0m0.000s

I think, 6 seconds is reasonable for now. Marking the bug as fixed.

Changed in openlibrary:
status: In Progress → Fix Released
Revision history for this message
George (george-archive) wrote :

Fantastic, Anand!! Good work!!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.