servo/components/script
Alan Jeffrey 237ddc3c0c Caching HTMCollections.
We cache the state of any live HTMLCollection, keeping track of

a) the optional cached length of the collection, and
b) an optional cursor into the collection (a node in the collection plus its index).

The cache is invalidated based on the version number of the node.

We use these caches for speeding up random access to the collection.
When returning coll[i], we search from the cursor, if it exists,
and otherwise search from the front of the collection.
In particular, both a forward for-loop and a backward for-loop
through the collection will now have each access take O(1)
time rather than O(n) time.

This gets 1000x speed-up on the relevant Dromaeo DOM query tests.
2015-11-06 17:23:17 -06:00
..
docs Move the DOM memory management blog post into the tree. 2015-10-29 17:25:00 +01:00
dom Caching HTMCollections. 2015-11-06 17:23:17 -06:00
parse Silence unused code warnings. 2015-11-05 09:58:56 +01:00
build.rs
Cargo.toml M1503 - Integrate XML parse -Initial Steps 2015-11-04 19:18:20 -05:00
clipboard_provider.rs Fix reported test-tidy errors for unmerged import blocks 2015-09-19 12:50:14 -04:00
cors.rs Simplify AsyncResponseListener implementations. 2015-10-15 16:53:47 -07:00
devtools.rs Make DOMString a newtype around String, rather than a typedef. 2015-11-04 12:09:11 +01:00
document_loader.rs Check in for task 1,4 and 5 2015-11-05 00:17:24 -05:00
layout_interface.rs Auto merge of #8239 - Ms2ger:ScriptReflow, r=pcwalton 2015-11-03 15:29:17 +05:30
lib.rs Move EventState to rust-selectors. 2015-10-30 21:02:35 -07:00
makefile.cargo Fix spurious rebuilds of the script crate 2015-10-08 21:37:56 -07:00
mem.rs more refactoring 2015-10-30 20:26:29 +09:00
network_listener.rs Make AsyncResponseListener methods take &mut self. 2015-10-15 16:44:39 -07:00
page.rs Removed JS::root Fixes #8251 2015-10-31 18:15:16 +05:30
script_task.rs Implement cancellable runnables. 2015-11-06 10:41:38 -05:00
textinput.rs Make DOMString a newtype around String, rather than a typedef. 2015-11-04 12:09:11 +01:00
timers.rs merge from master 2015-11-03 19:01:23 +09:00
unpremultiplytable.rs add un-premultiply table for GetImageData 2015-10-20 04:51:29 -04:00
webdriver_handlers.rs Make DOMString a newtype around String, rather than a typedef. 2015-11-04 12:09:11 +01:00