Summary: | miComputeWideEllipse with tall arcs (>10000 height) thrashes the server. | ||
---|---|---|---|
Product: | xorg | Reporter: | Brice Goglin <brice.goglin> |
Component: | Server/General | Assignee: | Adam Jackson <ajax> |
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | CC: | jesserayadkins, keithp |
Version: | 7.3 (2007.09) | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=442395 | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Brice Goglin
2007-11-24 05:13:41 UTC
(In reply to comment #0) > fakeent = {lrustamp = 28308, lw = 1, width = 295, height = 33791, spdata = > 0x13805a0} This is the line that stands out for me. Specifically : height = 33791. This results in about 21118 loops within miComputeSpans. This ends up in miComputeEllipseSpans with a K of 21118. That's 21118 loops in a VERY math intense loop. I'm assuming the solution is to either outright reject really tall arcs based on some arbitrary number, or to check that the arc isn't bigger than the screen before applying. Keith, I'm adding you to CC (or I should be), because you helped write the file this is in and probably know of a solution. Pretty sure this is fixed by: commit 0d7f05ed99b71a4641415c9f26e245c3bb24a9a0 Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 1 16:13:59 2017 -0500 miarc: "Cache" arc span data for dashed arcs This avoids recomputing the span data for every dash. x11perf thinks this is a pretty modest speedup: 832919.4 840471.1 ( 1.009) 100-pixel dashed ellipse 672353.1 680652.2 ( 1.012) 100-pixel double-dashed ellipse 13748.9 24287.9 ( 1.767) 100-pixel wide dashed ellipse 9236.3 21298.2 ( 2.306) 100-pixel wide double-dashed ellipse But part of the reason it's so modest there is that the arcs are relatively small (100 pixel diameter at line width 10, so ~6000 pixels) and the dashes relatively large (30 on 20 off so ~6 dashes per quadrant). With larger arcs and finer dashes this is much more impressive. A fairly trivial testcase of a single 15000x13000 arc with the default {2, 2} dash pattern drops from ~3500 milliseconds to 10 milliseconds. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.