examples

command
v0.0.0-...-82b10d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

This file provides a basic performance test against another popular svg drawing library. I tried to make the test as unbiased as possible, drawing the same SVG as I would with both libraries. Depending on the parameters, different libraries will win. The main area where purplecrayon wins is with long paths. This is because the path needs no intermediary (namely, a string which is appended to on each cursor move), it goes straight to the writer! For simpler objects, like rectangles, circles, and ellipses svgo wins. I believe this is due to the more complex function call structure of purplecrayon as compred to svgo.

To alleviate this, I will add some methods to configure multiple parameters at once.

Some notes on the test: I try to be as fair as possible by doing the following 3 things:

  1. Attempt to draw identically rendering SVGs with both libraries
  2. Call GC immediately before the drawing begins so that GC has a fair chance at negatively affecting both.
  3. Wrap the drawing functions and pass them off to the same timer, they both must perform all the same tasks within said function.

I'm no expert in performance analysis so I may be doing some things wrong here!

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL