Commit graph

49 commits

Author SHA1 Message Date
M Joonas Pihlaja
afba0c3129 [perf] Add perf tests to hit rectilinear code paths.
These tests look at the differences in code paths
hit by filling paths that are rectilinear (or not) and
pixel aligned (or not) with the even-odd and non-zero
fill rules.  The paths are not simple, so they don't
hit the special case quad/triangle tessellator.
2008-12-06 13:30:29 +02:00
M Joonas Pihlaja
8ec58113df [perf] Explicitly test rendering a path with lots of intersections.
We don't have one just for this purpose.  The only other
path with many intersections that gets actually rendered is zrusin-another,
but that might be sped up in the future (say by identifying
collinearities up front or something like that.)
2008-12-06 13:21:44 +02:00
Chris Wilson
7657bda017 [perf/pythagoras_tree] Another fractal.
Test lots of rectangles and recursion path construction.
2008-11-19 14:06:10 +00:00
Chris Wilson
abd0a2627d [perf/dragon] Add a dragon curve perf case.
Inspired by http://labs.trolltech.com/blogs/2007/08/31/rasterizing-dragons/
and http://en.wikipedia.org/wiki/Dragon_curve, add a performance test case
to measure drawing this space-filling fractal curve.
2008-11-19 14:06:10 +00:00
Chris Wilson
4f2f46ef1b Restore the ability to choose the internal font.
Behdad wants to include the feature with 1.10, so we enable it as early as
possible in 1.9 dev cycle to generate as much feedback as possible.

The first change is to use "<cairo>" as being a name unlikely to clash
with any real font names.

This reverts commits:
  a824d284be,
  2922336855,
  e0046aaf41,
  f534bd549e.
2008-10-30 19:14:45 +00:00
Carl Worth
e0046aaf41 Remove twin perf case.
This performance test relied on the recently-removed ability
to select the internal twin-based font family with a name of
"cairo".

Presumably, we'll want to bring this performance case back when
some other means of requesting that font face is added.
2008-10-29 16:26:39 -07:00
Chris Wilson
09651a1c1a Twin perf case 2008-10-22 16:38:12 +01:00
Chris Wilson
f2ff794426 [perf] A crude tool to visualise performance changes across a series.
Generate a cairo-perf-diff graph for a series of commits in order to be
able to identify significant commits. Still very crude, but minimally
functional.
2008-10-19 09:36:53 +01:00
Björn Lindqvist
f644d78dc1 [perf] Add composite performance test.
Add a new test case to Cairo for checking the performance of Cairo's
equivalent to GDK's gdk_pixbuf_composite_color() operation. That is an
operation that happens to be extremely useful when viewing or editing
transparent images so I think it is important that it is as fast as
possible.
2008-10-08 20:10:27 +01:00
Chris Wilson
0a7d781ab0 [perf] Add rounded rectangle perf case.
Add the performance test case to compare the speed of filling a rounded
rectangle (one with camphered corners) as opposed to an ordinary
rectangle. Since the majority of the pixels are identical, ideally the two
cases would take similar times (modulo the additional overhead in the more
complex path).
2008-09-28 18:59:43 +01:00
Chris Wilson
ac44817c4a [cairo-perf] Only allocate arrays once.
Store the array of times on the cairo_perf_t context to avoid
reallocating it for every perf-case.
2008-06-13 21:34:42 +01:00
Azar@.(none)
95db215cc1 Some fixes and improvements to the Win32 build 2008-02-06 21:45:24 -05:00
Vladimir Vukicevic
2477e57de5 [perf] Add pixman_region_init_rects and use in extract_region
Avoid O(N*N) loop in traps_extract_region by letting us hand pixman
an array of rects all at once.
2007-06-18 14:02:41 -07:00
Carl Worth
72b812be8c perf: Add new paint-with-alpha test
MacSlow noticed that cairo_paint_with_alpha is much slower than
it should be, (and jrmuizel has a nice plan for fixing the
performance bug).
2007-04-25 07:24:23 -07:00
Dan Amelang
382e021ccb Add "rectangles" perf test
This test draws many small, solid pixel-aligned rectangles one at a
time.
2007-01-31 11:53:06 -08:00
Carl Worth
d5531c4f50 Add unaligned_clip perf case courtesy of Jeff Muizelaar
Conflicts:

	perf/Makefile.am
	perf/cairo-perf.c
	perf/cairo-perf.h
2007-01-09 14:31:22 -08:00
Carl Worth
cc11c264ec Add long-lines perf case
This shows some very bad slowness for lines that are mostly
offscreen (like 100x slower than just drawing the visible
portion).
2007-01-05 16:50:11 -08:00
M Joonas Pihlaja
4c95e2b7bf New performance test case "mosaic" for splines. 2006-12-16 21:32:19 +02:00
Carl Worth
1ed3811338 perf: Add box_outline test case.
This test shows that drawing a 100x100 single-pixel wide box outline is
currently 5 to 16 times slower when using the natural cairo_stroke() as
compared to a rather awkward cairo_fill() of two rectangles.

[ # ]  backend-content                    test-size min(ticks)  min(ms) median(ms) stddev. iterations
[  0]    image-rgba         box-outline-stroke-100     301321    0.218    0.219  0.39%   5
[  1]    image-rgba           box-outline-fill-100      18178    0.013    0.013  0.43%   5
[  0]     xlib-rgba         box-outline-stroke-100     379177    0.275    0.276  1.39%   6
[  1]     xlib-rgba           box-outline-fill-100      83355    0.060    0.060  0.17%   5
2006-11-17 18:00:36 -08:00
Carl Worth
f6b400a292 perf: Add world-map performance test case.
The map for this test case was originally demonstrated as a
performance problem in this mozilla bug report:

	A very slow SVG file with <path>s
	https://bugzilla.mozilla.org/show_bug.cgi?id=332413

I obtained permission from the creator of the original file to
include the data here, (see comments in world-map.h for details).
2006-11-08 06:07:01 -08:00
Carl Worth
5393989272 perf: Move statistics code into new cairo-stats.h for sharing 2006-11-08 06:07:01 -08:00
Carl Worth
0564b5074c cairo-perf: Add command line options for test cases to run, listing tests, and new raw mode. 2006-11-07 01:29:38 -08:00
Carl Worth
49b72f004d Add zrusin-another test cases (tessellate and fill).
This new test case is the 0th polygon polygon from Zack Rusin's
recent cairorender program as made avaialable here:

	http://ktown.kde.org/~zrusin/examples/cairorender.tar.bz2

This polygon contains about 1000 coordinates and looks like a
hand-drawn version of the word another.
2006-11-06 23:56:19 -08:00
Dan Amelang
d2d0d11bde Add new perf test "pattern_create_radial"
This test is really just for hammering the double to fixed-point conversion
(in _cairo_fixed_from_double) that happens as doubles from API calls gets
translated into internal cairo fixed-point numbers.
2006-11-02 10:38:00 -08:00
Carl Worth
d7c2f7e2d7 perf: Rename finalize to synchronize as it is used in both start() and stop() now 2006-10-05 15:14:14 -07:00
Carl Worth
5412343a77 perf: Add subimage_copy test to demonstrate performance bug found by monty 2006-10-05 12:31:50 -07:00
Carl Worth
9285a1f7fe perf: Add text test 2006-10-05 12:31:50 -07:00
Carl Worth
fb61fe82d3 perf: Add stroke and fill tests 2006-10-04 17:14:12 -07:00
Carl Worth
d52256df7c perf: Move iteration over sources and operators from paint to new cairo-perf-cover
This will finally allow us to very easily add lots of other
tests that will similarly involve iterating over the various
sources and operators of interest.
2006-10-04 17:14:12 -07:00
Carl Worth
d0aae4dbcf perf: Make cairo_t* available to perf functions 2006-10-04 17:14:11 -07:00
Carl Worth
3c19a6413c perf: Rework the suite to allow multiple performance tests to be defined in one file. 2006-09-29 16:42:44 -07:00
Vladimir Vukicevic
8a9b99e596 [perf] Change perf output format, report times in ms, add a few paint tests
This changes the perf test output format to be a little more human friendly,
reporting times in ms instead of seconds.  It also adds a test number
that could be used in the future for specifying an explicit test to run
(test number, target surface, test name, and size uniquiely identify
a test).

Also adds a few paint tests.
2006-09-19 12:19:20 -07:00
Carl Worth
cb6aed0a81 perf: Make xlib testing wait for the X server to finish rendering.
We do this by adding a new cairo_perf_timer_set_finalize function and
in the case of the xlib backend passing a callback to that function
that does a 1x1 XGetImage.
2006-09-11 10:59:38 -07:00
Carl Worth
a7844338da perf: Add tessellate test case (in -16, -64, and -256 varieties) 2006-09-06 05:17:01 -07:00
Carl Worth
d31037e421 perf: Report times not rates. Interface in integers not doubles. 2006-09-06 00:15:49 -07:00
Carl Worth
9d0d38e0a0 perf: Rename functions in line with cairo's naming guidelines 2006-09-05 22:58:33 -07:00
Carl Worth
9f51fcc888 perf: Fold cairo-perf-timer.h into cairo-perf.h 2006-09-05 22:56:00 -07:00
Carl Worth
499a3a7c47 perf: Remove unused alarm functions 2006-09-05 22:52:00 -07:00
Carl Worth
2fa0228d63 Two big improvements to bring the std. deviation down to where we want it.
1. Remove all the alarm/signal code, which just isn't doing what we want for some reason.
   Instead, for now we'll simply run for a fixed number of iterations, (perhaps we
   can tune that per test later).

2. Before computing mean and stdandard deviation of runs, sort them all and discard the
   top and bottom 20% of the values.

Now the standard deviation for the paint test is generally 2% or less.
2006-08-31 17:43:40 -07:00
Carl Worth
6ae6d91c0c perf: Switch from alarm to setitimer for more fine-grained control of timers 2006-08-31 14:08:43 -07:00
Carl Worth
0c741675e1 Make perf interface return a rate. Start print target and test names. 2006-08-31 11:51:28 -07:00
Carl Worth
fd13e874a7 perf: Drop separate setup function from each test case.
We are already doing loop measurement internally, so each function
can already do any setup it needs without it affecting the measurement.
2006-08-31 11:42:51 -07:00
Carl Worth
578b74473d perf: More consistency improvements for names.
Rename bench_timer_t to cairo_perf_timer_t.
Rename PERF_LOOP macros to CAIRO_PERF_LOOP
Rename DECL_PERF_FUNC to CAIRO_PERF_DECL
2006-08-31 11:38:23 -07:00
Carl Worth
cf75da4842 perf: Rename timer-alarm files to cairo-perf-timer 2006-08-31 11:38:23 -07:00
Carl Worth
7f6e901a23 perf: More simplification of PERF_LOOP macros.
Here we drop both the start_timing and stop_timing functions,
foliding their contents into main, PERF_LOOP_INIT and
PERF_LOOP_FINI.
2006-08-31 11:19:48 -07:00
Carl Worth
b9f629d542 perf: Don't require a separate counter from the timer for perf loops. 2006-08-31 11:02:20 -07:00
Carl Worth
13bcba68ae perf: Collapse timing.[ch] down into cairo-perf.[ch] 2006-08-31 10:41:00 -07:00
Carl Worth
739c476767 Initial hookup of Vlad's timer/alarm code 2006-08-31 10:29:52 -07:00
Carl Worth
e153c55dff perf: Add initial skeleton of performance monitoring suite 2006-08-31 07:19:05 -07:00