Patrick Walton
9479a7dcac
layout: Run assign-widths in parallel.
...
5% layout speedup on mobile Wikipedia.
2014-02-24 18:06:24 -08:00
bors-servo
998710d907
auto merge of #1738 : saneyuki/servo/opt, r=kmcallister
...
I think gfx/opts.rs should be placed to more general place.
2014-02-24 17:43:41 -05:00
Tetsuharu OHZEKI
63cab5c72c
Move from gfx::opts to servo_util::opts.
2014-02-25 07:07:54 +09:00
Josh Matthews
625325434b
Implement JSManaged for DOM objects.
2014-02-24 15:16:42 -05:00
Patrick Walton
509cc3cb3a
Shut down the profiler in headless compositing mode
2014-02-20 22:16:40 -08:00
Youngmin Yoo
13f9a66632
Impl Basic support for object element
2014-02-20 17:31:16 +09:00
Patrick Walton
d3e56fa9cc
layout: Aggressively try to share styles with the last few nodes seen.
...
This roughly implements the same cache found in Blink. 50% improvement
on the rainbow page, but at the cost of reducing parallel gains down to
nothing. I added a new page, `perf-rainbow-hard.html`, which disables
the optimizations in both Blink and Servo.
2014-02-14 17:37:51 -08:00
Patrick Walton
0fa0940ce9
layout: Cache applicable-declarations-to-computed-values mappings.
...
If the cache is hit, then we can only compute inherited properties. This
is a WebKit optimization.
2014-02-14 17:37:50 -08:00
Patrick Walton
1678cc9a88
layout: Implement basic style sharing.
...
No improvement on the rainbow page, but necessary for some other
optimizations we want to do.
2014-02-14 17:37:50 -08:00
Patrick Walton
cf8203848a
layout: Stop storing intermediate applicable declarations inside layout
...
data.
9% improvement in style recalc on the rainbow page.
2014-02-14 17:37:12 -08:00
Keegan McAllister
36b8f63984
Restore failure handling
...
We probably leak some threads and resources, e.g. when the script task crashes
and doesn't get a chance to send layout data back to layout to be deallocated.
Not tested with iframes yet.
2014-02-12 18:07:32 -08:00
HyunJune Kim
c8d503898a
This is implement Hover Event. If over element, currently full reflow. after PR, will make partial reflow.
2014-02-10 11:16:07 +09:00
Keegan McAllister
78d2118f47
Eliminate the extra indirection of DList<~Flow>
2014-02-05 14:42:32 -08:00
patrick kim
a90c2e3a26
implement position:relative
2014-02-05 09:39:44 +09:00
Patrick Walton
17eea6bb45
layout: Enforce that flow construction is thread-safe.
...
Closes #1584 .
2014-01-31 17:54:13 -08:00
bors-servo
e2e848c6ad
auto merge of #1600 : pcwalton/servo/use-concurrent-hash-map, r=larsbergstrom
...
64% improvement in style recalc.
r? @larsbergstrom
2014-01-30 16:28:18 -08:00
bors-servo
31442fe856
auto merge of #1598 : pcwalton/servo/sequential-mirrors-parallel, r=larsbergstrom
...
in the parallel path.
r? @larsbergstrom
2014-01-30 16:01:24 -08:00
Patrick Walton
939f1a28a3
layout: Consolidate passes in the sequential path that were consolidated
...
in the parallel path.
2014-01-30 15:25:25 -08:00
bors-servo
9352e1db00
auto merge of #1579 : ibnc/servo/multiple_display_lists, r=larsbergstrom
...
Fixes : #1538
Still needs to be rebased.
2014-01-30 15:22:33 -08:00
Patrick Walton
a8e35fbeac
layout: Use the concurrent hash map for the leaf sets.
...
64% improvement in style recalc.
2014-01-30 15:11:35 -08:00
Isabelle Carter
0892fada74
Multiple display list support
2014-01-30 17:11:17 -06:00
Patrick Walton
94ab4f5086
layout: Perform aux initialization in parallel.
...
Brings aux initialization time down to essentially zero (!)
2014-01-30 13:13:56 -08:00
Patrick Walton
b27f4a8969
layout: Introduce a DOM leaf set as a prerequisite for parallel flow
...
construction.
This will be very slow until we have the concurrent hash table, but we
might as well get it in.
2014-01-29 21:05:50 -08:00
bors-servo
9f6ab8ed77
auto merge of #1589 : pcwalton/servo/stop-removing-flows, r=larsbergstrom
...
to be leaves.
60% improvement in flow tree construction time on the rainbow page.
r? @larsbergstrom
2014-01-29 15:09:52 -08:00
Patrick Walton
e579daefc2
layout: Stop adding flows to the leaf set that are obviously never going
...
to be leaves.
60% improvement in flow tree construction time on the rainbow page.
2014-01-29 15:01:26 -08:00
Patrick Walton
21656b874d
layout: Profile layout damage propagation and group "style recalc" (as
...
WebKit calls it) into one supercategory in the profiler
2014-01-29 11:41:22 -08:00
Patrick Walton
9c3af574e5
layout: Perform cascading in parallel.
...
Speeds up the cascade by 3x.
2014-01-27 14:41:52 -08:00
Patrick Walton
cb2e225b14
layout: Switch parallel selector matching over to using work stealing.
...
10% speedup over what we had before.
2014-01-27 12:44:54 -08:00
Patrick Walton
55ccfae1e8
layout: Profile the CSS cascade as well as selector matching.
...
It's slow.
2014-01-25 18:13:59 -08:00
Patrick Walton
18a2050a64
layout: Port parallel layout over to a generic "work queue"
...
infrastructure.
The work queue accepts abstract generic "work units", which in this case
are layout operations. The same speedups have been observed.
2014-01-24 20:50:30 -08:00
Patrick Walton
5cc744d25d
layout: Destroy flows properly under display: none
.
...
Fixes a crash on http://en.wikipedia.org/wiki/South_China_Sea
It plants a destructor bomb on flows so that this can't happen again.
2014-01-24 10:37:46 -08:00
patrick kim
b0380ae96a
fix text-decoration property in layout
2014-01-23 09:51:08 +09:00
Patrick Walton
54f0f17f83
layout: Implement parallel reflow for the bubble-widths and
...
assign-heights phases.
This uses the new work-stealing deque. By default, 3/4 of a thread per
logical CPU is used. This can be tuned with the `-y` flag.
I measured a 65% reflow speedup on `perf-rainbow.html` and a 247% reflow
speedup on `http://en.wikipedia.org/wiki/South_China_Sea ` on a 4-core
HyperThreaded Core i7. However, numbers were fairly volatile, especially
for the latter.
2014-01-22 15:59:21 -08:00
Patrick Walton
7d447dbc06
script: Stop trusting pointers to DOM nodes that layout provides.
...
Pointers to DOM nodes from layout could go stale if incremental reflow
does not correctly destroy dead nodes. Therefore, we ask the JavaScript
garbage collector to verify that each DOM node is indeed a valid pointer
before calling event handlers on it, and fail otherwise.
2014-01-14 21:51:24 -08:00
zmike
193b6d2635
add names for all servo spawned tasks
...
* add servo_util::task::{spawn_named,spawn_with_named} functions
* add name param for spawn_listener and spawn_conversation functions
this should resolve #1169
2014-01-13 13:12:48 -05:00
Jack Moffitt
a7ef1cd35e
Upgrade to latest Rust.
2014-01-12 19:45:45 -07:00
Simon Sapin
a16087da5f
Selector mathing: Move the pseudo-elements buckets inside Stylist.
...
Refactor to have only one Stylist per document.
2014-01-08 14:54:16 +00:00
Jaeman Park
62691cb6ef
Change range to iter() and add comment for FirstLine and FirstLetter
2014-01-08 09:09:52 +09:00
Jaeman Park
138e425607
CSS parsing/selector-matching for pseudo elements
2014-01-07 18:03:07 +09:00
Patrick Walton
9e2b63ddd3
layout: Move the LayoutNode
wrapper from script into layout.
2013-12-17 18:07:41 -08:00
Patrick Walton
be69a503fe
script: Eliminate the phantom type in favor of just whitelisting methods
...
that layout can safely call.
This is simpler. Currently, the set of methods is not safe, but I plan
to lock it down more soon.
2013-12-17 18:07:12 -08:00
Patrick Walton
199ca33b72
script: Make trees less generic
2013-12-17 13:46:14 -08:00
Patrick Walton
89af9017ef
layout: Replace AbstractNode
s in layout with OpaqueNode
, preventing
...
DOM access during reflow.
2013-12-16 15:17:15 -08:00
Daniel Hedlund
e7a591a7e1
Ensure render and layout tasks get destructed before main thread finishes
...
Fixes #1097 .
2013-12-15 14:25:41 -08:00
Patrick Walton
971f77d2c6
layout: Stop going to the DOM for iframe sizes
2013-12-13 15:10:04 -08:00
Patrick Walton
21e8c72a75
constellation: Stop using futures for frame sizes.
...
This will allow us to stop going to the DOM in order to handle iframe
sizing. Instead we can just store the pipeline and frame IDs of iframes
inside the flow tree itself.
2013-12-13 10:43:27 -08:00
Patrick Walton
a2e91d242b
layout: Perform text decoration propagation per CSS 2.1 § 16.3.1 without
...
going to the DOM.
2013-12-12 17:54:51 -08:00
bors-servo
144737ce1b
auto merge of #1394 : kmcallister/servo/style-damage, r=pcwalton
...
This fixes the computation of restyle damage on `color-change-text.html`, which can be seen with `RUST_LOG=servo::layout::layout_task`.
However we can't prune the layout traversals yet, because we don't reuse `Flow` objects between reflows, so we have no old values to fall back to.
I think this used to work because `FlowContexts` (as they were called then) were stored in a DOM node's `LayoutData` and reused. But it's possible that it never really worked, and my testing when I landed the restyle damage code was insufficient (I didn't understand the layout code nearly as well back then).
r? @pcwalton
2013-12-12 15:17:27 -08:00
Keegan McAllister
53747638a1
Disable remaining reflow traversal pruning for now
...
We don't reuse Flow objects between reflows, so we have no old values to fall
back to.
I think this used to work because FlowContexts (as they were called then) were
stored in a DOM node's LayoutData and reused. But it's possible that it never
really worked, and my testing when I landed the restyle damage code was
insufficient (I didn't understand the layout code nearly as well back then).
2013-12-12 14:44:34 -08:00
Patrick Walton
4c8383c38b
layout: Reference count ComputedValues
structures like Gecko does.
...
This has no difference in CSS selector matching performance and results
in a 31% speedup in constraint solving on the rainbow page.
2013-12-12 14:44:24 -08:00