octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63646] Long creation times for sparseimages.m


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #63646] Long creation times for sparseimages.m in manual due to -svgconvert option to print
Date: Mon, 16 Jan 2023 16:57:52 -0500 (EST)

Follow-up Comment #20, bug #63646 (project octave):

Triangles are buffered one after the other in an octave_polygon object using
the `octave_polygon::add` method. At this stage a triangle is merged with the
previous one if it can be. 

When only consecutive triangles can be merged, as in the original example, all
the work has been done before the expensive octave_polygon::mergepoly method
is called, so it consumes much times and doesn't do anything useful, as
noticed by jwe.

Now with the following 3D example (smaller so that I don't have to wait
minutes in front of my old computer), I can see a difference in file size


cla
sombrero (10);
ch = get (gca, "children");
set (ch, "facecolor", "r", "edgecolor", "none")
view (2)
print toto_svgconvert_old.svg
ls -lh toto*


which gives


... 179K Jan 16 22:03 toto_nosvgconvert.svg
... 110K Jan 16 22:02 toto_svgconvert_new.svg
... 47K Jan 16 22:25 toto_svgconvert_old.svg


With the old code, more polygons are merged (not only consecutive ones) but
the result is still far from perfect (due mainly to the coordinate comparison
tolerance). I attached the svg files so that you can inspect them and see
visual artifacts.


(file #54235, file #54236, file #54237)

    _______________________________________________________

Additional Item Attachment:

File name: toto_nosvgconvert.svg          Size:178 KB
    <https://file.savannah.gnu.org/file/toto_nosvgconvert.svg?file_id=54235>

File name: toto_svgconvert_new.svg        Size:109 KB
    <https://file.savannah.gnu.org/file/toto_svgconvert_new.svg?file_id=54236>

File name: toto_svgconvert_old.svg        Size:46 KB
    <https://file.savannah.gnu.org/file/toto_svgconvert_old.svg?file_id=54237>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63646>

_______________________________________________
Message posté via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]