ziahamza/webui-aria2 — pull request #41 by carlmon (2013-01-03 17:58:19+00:00)
Title: Performance improvements for many (>200) downloads

* Profiled the code and found a few speed issues.
* Main culprit was the jQuery [data-gid=' + ctx.gid + '] selector, so I changed it to do local finds from the parent elem with more information (elem type "div" and class type "download_item").
* Replaced underscore with compatible lodash.

Attached screenshot shows CPU profile after these changes. Setting text() in updateDownloadTemplates causes lots of reflows. Updating statistics is also slow when it resizes the plot (even when the graph is not visible).

![Screen Shot 2013-01-03 at 7 44 19 PM](https://f.cloud.github.com/assets/450101/41199/d595bc34-55ce-11e2-93cc-cabfffe1473a.png)