When removing a download, Angular doesn't update the download list correctly
when it receives new data unless we pull out the item that should be removed
from the array manually first.
* Pre-compute name, formatted sizes and speeds.
* Handle name edge-cases such as no-path and no-uris better.
* Unroll getCtx.
* Improve performance of mergeMap.
* Delay the search filter.
As indicated by Chrome/Gecko profilers.
This will improve the performance a lot. First load performance may
suffer a bit, though.
Also, the leading "./" is skipped now, as this causes additional string
ops, which turn out to be particularly harmful in some cases (slots vs
heaps aka. shortstrings in spidermonkey, allocation overhead). And the
leading "./" is not really required anymore.
* Latest JQuery 2.x
* Latest angular
* Last 2.x bootstrap
* Last 3.x font-awesome
* Last compatible angular-bootstrap UI (0.8)
This fixes some nasty display issues, such as items starting out at
uncollapsed, to be immediately collapsed after the load.
Also it seems to improve performance a bit in certain areas, while
performance regressions in other areas are neglectable.
Angular uses dirty-checking for data-bindings. This is OK for POD types,
but when it comes to objects, incl. arrays, just stuffing in the new
array without checking for changed content will make angular think
something has changed and update the DOM when there really was no change
at all. So do not blindly copy over objects and arrays anymore.
Also, since webui-aria2 does not use all `bittorrent` and `file` fields,
there is no point in keeping all fields around, causing unnecessary
angular invalidations.
With this commit, the update code runs in about 1/10th of the time it
did before on my system (Chrome/Firefox) when using displaying many
torrent downloads with many files.