#114 g-dxf runs for 24 minutes

performance
closed-fixed
5
2008-05-07
2007-04-28
No

I ran time g-dxf -o bla.dxf perpend.g perpend and when it ran really excessively long I broke it:
user 24m14.875s

It creates large unions, progressively larger and larger and gets progressively slower and slower:

[...]

_cyl10_0.8115_0.0625.s))) u (((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.811
5_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u (
(thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.
8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)))) u (((thread_cyl10_0.8115_0.0625
.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl1
0_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.062
5.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)))) u (((((t
hread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.81
15_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u
thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8
115_0.0625.s))) u (((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s
) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cy
l10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.062
5.s u thread_cyl10_0.8115_0.0625.s)))) u (((thread_cyl10_0.8115_0.0625.s u threa
d_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0
.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (th
read_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s))))) u ((((((thread_cy
l10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.062
5.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_c
yl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.06
25.s))) u (((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thr
ead_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.81
15_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u th
read_cyl10_0.8115_0.0625.s)))) u (((thread_cyl10_0.8115_0.0625.s u thread_cyl10_
0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)
) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl
10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)))) u (((((thread_cyl10_0.8115
_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thre
ad_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.811
5_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s))) u
(((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_
0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.
s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10
_0.8115_0.0625.s)))) u (((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0
625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thre
ad_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_
0.0625.s u thread_cyl10_0.8115_0.0625.s))))))} u {(((((((thread_cyl10_0.8115_0.0
625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_c
yl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.
0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s))) u (((t
hread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.81
15_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u
thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8
115_0.0625.s)))) u (((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.
s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_c
yl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.06
25.s u thread_cyl10_0.8115_0.0625.s)))) u (((((thread_cyl10_0.8115_0.0625.s u th
read_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.811
5_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u
(thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s))) u (((thread_cyl1
0_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.
s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl
10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625
.s)))) u (((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thre
ad_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.811
5_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thr
ead_cyl10_0.8115_0.0625.s))))) u ((((((thread_cyl10_0.8115_0.0625.s u thread_cyl
10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625
.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_
cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s))) u (((thread_cyl10_0.8115
_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thre
ad_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.811
5_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)))) u
(((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10
_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625
.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl1
0_0.8115_0.0625.s)))) u (((((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_
0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)) u ((t
hread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.81
15_0.0625.s u thread_cyl10_0.8115_0.0625.s))) u (((thread_cyl10_0.8115_0.0625.s
u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0
.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s
) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s)))) u (((thread
_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.
0625.s u thread_cyl10_0.8115_0.0625.s)) u ((thread_cyl10_0.8115_0.0625.s u threa
d_cyl10_0.8115_0.0625.s) u (thread_cyl10_0.8115_0.0625.s u thread_cyl10_0.8115_0

Discussion

  • Karel Kulhavy

    Karel Kulhavy - 2007-04-28
     
  • John Anderson

    John Anderson - 2007-04-28

    Logged In: YES
    user_id=1185553
    Originator: NO

    I downloaded the perpend.g file, but it appears to be corrupted. Can you upload a new copy??

     
  • Sean Morrison

    Sean Morrison - 2008-05-07

    Logged In: YES
    user_id=785737
    Originator: NO

    The .g seems okay to me, at least I was able to bring up perpend and ray-trace it without any problems. The output paste does appear to be trimmed, it doesn't show a failure. The fact that it gets "progressively larger and larger and gets
    progressively slower and slower" isn't a bug but how the tessellation process works, iteratively evaluating the boolean expressions. Those bolt threads are utter hell to tessellate.

     
  • Sean Morrison

    Sean Morrison - 2008-05-07
    • labels: --> Geometry Conversion
    • status: open --> pending
     
  • Sean Morrison

    Sean Morrison - 2008-05-07
    • assigned_to: nobody --> brlcad
    • status: pending --> closed-fixed
     
  • Sean Morrison

    Sean Morrison - 2008-05-07

    Logged In: YES
    user_id=785737
    Originator: NO

    Karel,

    I've uploaded perpend converted along with some screenshots and info to http://brlcad.org/tmp/perpend/ for your entertainment. I didn't get a dxf export failure like you did so either the bug you ran into has since been fixed or it was closely tied to floating point differences. That said, while it didn't fail, it did take about 15 hours (!) to complete on a single cpu (g-dxf only uses one cpu). It only ended up using about 360MB of memory so I can't imagine that was the problem. There were, however, a slew of tessellation fixes a couple months ago so it may have simply been inadvertently fixed. Either way, it seems to be working now.

    Cheers!
    Sean

     
  • Karel Kulhavy

    Karel Kulhavy - 2008-05-08

    Logged In: YES
    user_id=1194787
    Originator: YES

    Download the file from http://ronja.twibright.com/3d/perpend.g
    The Sourceforget tracker seems to corrupt files.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks