sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Changes in 2015

    Scheduled Pinned Locked Moved Developers' Forum
    45 Posts 11 Posters 1.6k Views 11 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      kaas
      last edited by

      @driven said:

      I ran a variation of your script in v13 and v15 on my mac...

      t = Time.now
      > f = Sketchup.find_support_file('candle.skp', 'Components')
      > d = Sketchup.active_model.definitions.load f
      > puts (Time.now - t) 
      > #  all in different sessions of SU
      > # v13 => 0.146086 , 0.037117, 0.022029
      > # v15 => 0.033036, 0.046043,  0.013811
      

      john

      Thanks for looking into it. I tried your code on win32 and it loads the skp instantly. Great...but, plugins aren't installed in a sub-directory of the SketchUp installation directory anymore. Isn't it bad practice to put resources for a plugin in SketchUps installation directory instead of together with the code in the plugin directory?

      1 Reply Last reply Reply Quote 0
      • tt_suT Offline
        tt_su
        last edited by

        DefinitionList.load Performance Tests:

        Test snippet:

        <span class="syntaxdefault">skp </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">find_support_file</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'Car Sedan.skp'</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">'Components/Components Sampler'</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">puts </span><span class="syntaxstring">"DefinitionList.load Timing Tests"<br /></span><span class="syntaxdefault">puts </span><span class="syntaxstring">"> SketchUp Version; #{Sketchup.version}"<br /></span><span class="syntaxdefault">total </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> 0.0<br />iterations </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> 10<br />iterations</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">times </span><span class="syntaxkeyword">{</span><span class="syntaxdefault"> </span><span class="syntaxkeyword">|</span><span class="syntaxdefault">i</span><span class="syntaxkeyword">|<br /></span><span class="syntaxdefault">  GC</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">start<br />  start_time </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> Time</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">now<br />  definition </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">definitions</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">load</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">skp</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">  elapsed </span><span class="syntaxkeyword">=</span><span class="syntaxdefault"> Time</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">now </span><span class="syntaxkeyword">-</span><span class="syntaxdefault"> start_time<br />  total </span><span class="syntaxkeyword">+=</span><span class="syntaxdefault"> elapsed<br />  puts </span><span class="syntaxstring">"> #{elapsed}; #{elapsed}"<br /></span><span class="syntaxdefault">  Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">start_operation</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"Remove Definition"</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">  definition</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">entities</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">clear</span><span class="syntaxkeyword">!<br /></span><span class="syntaxdefault">  Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">commit_operation<br /></span><span class="syntaxkeyword">}<br /></span><span class="syntaxdefault">puts </span><span class="syntaxstring">"> Average; #{total / iterations.to_f}"<br /></span><span class="syntaxcomment"># require File.join(ENV['HOME'] || ENV['HOMEPATH'], 'Desktop', 'definition_list_load_test.rb')<br />&nbsp;</span><span class="syntaxdefault"></span>
        
        DefinitionList.load Timing Tests
        > SketchUp Version; 15.0.9350
        > 0.023006; 0.023006
        > 0.037007; 0.037007
        > 0.036002; 0.036002
        > 0.034998; 0.034998
        > 0.035001; 0.035001
        > 0.035001; 0.035001
        > 0.036999; 0.036999
        > 0.035999; 0.035999
        > 0.035002; 0.035002
        > 0.035997; 0.035997
        > Average; 0.034501199999999996
        
        DefinitionList.load Timing Tests
        > SketchUp Version; 14.1.1282
        > 0.033001; 0.033001
        > 0.034001; 0.034001
        > 0.032002; 0.032002
        > 0.034003; 0.034003
        > 0.032001; 0.032001
        > 0.033003; 0.033003
        > 0.032002; 0.032002
        > 0.031001; 0.031001
        > 0.030007; 0.030007
        > 0.032006; 0.032006
        > Average; 0.032302700000000004
        
        DefinitionList.load Timing Tests
        > SketchUp Version; 13.0.4812
        > 0.038; 0.038
        > 0.033; 0.033
        > 0.033; 0.033
        > 0.03; 0.03
        > 0.03; 0.03
        > 0.03; 0.03
        > 0.03; 0.03
        > 0.03; 0.03
        > 0.03; 0.03
        > 0.03; 0.03
        > Average; 0.0314
        
        DefinitionList.load Timing Tests
        > SketchUp Version; 8.0.16846
        > 0.054; 0.054
        > 0.04; 0.04
        > 0.04; 0.04
        > 0.045; 0.045
        > 0.04; 0.04
        > 0.04; 0.04
        > 0.04; 0.04
        > 0.04; 0.04
        > 0.041; 0.041
        > 0.04; 0.04
        > Average; 0.042
        
        DefinitionList.load Timing Tests
        > SketchUp Version; 7.1.6860
        > 0.035; 0.035
        > 0.048; 0.048
        > 0.043; 0.043
        > 0.042; 0.042
        > 0.043; 0.043
        > 0.046; 0.046
        > 0.043; 0.043
        > 0.043; 0.043
        > 0.042; 0.042
        > 0.043; 0.043
        > Average; 0.0428
        

        I'm not seeing any performance regression - looks rather consistent on this end.. I'm not sure why you are seeing a difference on your system. ❓

        1 Reply Last reply Reply Quote 0
        • jiminy-billy-bobJ Offline
          jiminy-billy-bob
          last edited by

          @brighter3d said:

          Maybe you are right...
          For people doing renderings 2015 is first professional version (thanks to 64bit and possibility to use whole memory).
          From the other side v8 is last true free version (according to the license)...

          Do you know any recent statistics on SU versions usage?

          I have some data : http://thomashauchecorne.com/layers/analytics.php
          But it's only about Layers Panel users (around 500 unique daily users)

          25% off Skatter for SketchUcation Premium Members

          1 Reply Last reply Reply Quote 0
          • K Offline
            kaas
            last edited by

            @tt_su said:

            I'm not seeing any performance regression - looks rather consistent on this end.. I'm not sure why you are seeing a difference on your system. ❓

            Hi Thom, thanks for taking time to look at my code-problem.

            I don't see big differences as well if I load components from the SketchUp Components sub-folder (see my post, two posts above your post).

            Have you tried my original code (loading from root of C OR loading from the Sketchup plugins folder) and looked at the differences?

            I tested your code and here are the results:

            SketchUp Version: 15.0.9350
            0.06: 0.06
            0.04: 0.04
            0.05: 0.05
            0.04: 0.04
            0.040001: 0.040001
            0.04: 0.04
            0.05: 0.05
            0.04: 0.04
            0.04: 0.04
            0.04: 0.04
            Average: 0.0440001

            SketchUp Version: 14.1.1282
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            0.02: 0.02
            Average: 0.019999999999999997

            1 Reply Last reply Reply Quote 0
            • tt_suT Offline
              tt_su
              last edited by

              I still don't see any difference. Do you have a sample model to share?

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                If a component has a classification assigned, the entire schema could be serialized into the skp file.

                Upon loading the schema is loaded into the active model, correct TT ?

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • tt_suT Offline
                  tt_su
                  last edited by

                  Yup!

                  1 Reply Last reply Reply Quote 0
                  • tt_suT Offline
                    tt_su
                    last edited by

                    Well, actually, I'm not sure what SU does when you import... Need to check that. But it could be that we load the schema.

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kaas
                      last edited by

                      @tt_su said:

                      I still don't see any difference. Do you have a sample model to share?

                      I just did some tests with all kinds of code and you might be right it's my component files that are causing the problem. This one (see attachment) for instance takes 0.93 seconds to load in V15 while in V14 it takes 0.36

                      I'm puzzled...

                      edit:

                      • the file in the attachment is 70kB in size. If I re-create it from scratch the file is 11Kb in size. Maybe there's something hidden/attributes that isn't purged using TIG's purge?

                      bed2p.skp

                      1 Reply Last reply Reply Quote 0
                      • tt_suT Offline
                        tt_su
                        last edited by

                        Ok - now I can reproduce this:

                        
                        DefinitionList.load Timing Tests
                        > SketchUp Version; 14.1.1282
                        > File; C;/Users/Thomas/Desktop/bed2p.skp
                        > 0.623036
                        > 0.566034
                        > 0.561033
                        > 0.560033
                        > 0.566032
                        > 0.565037
                        > 0.569028
                        > 0.567033
                        > 0.558033
                        > 0.597035
                        > Average; 0.5732334000000001
                        
                        
                        
                        DefinitionList.load Timing Tests
                        > SketchUp Version; 15.0.9350
                        > File; C;/Users/Thomas/Desktop/bed2p.skp
                        > 1.236068
                        > 1.278074
                        > 1.295075
                        > 1.286072
                        > 1.284073
                        > 1.28907
                        > 1.289079
                        > 1.281074
                        > 1.275078
                        > 1.276078
                        > Average; 1.2789741000000001
                        
                        

                        I'll forward this to the team. It looks to be related to the classifier system as after I removed the IFC schema and saved a new file:

                        
                        DefinitionList.load Timing Tests
                        > SketchUp Version; 14.1.1282
                        > File; C;/Users/Thomas/Desktop/bed2p2.skp
                        > 0.008995
                        > 0.006996
                        > 0.008
                        > 0.008001
                        > 0.008006
                        > 0.008997
                        > 0.008996
                        > 0.007997
                        > 0.009
                        > 0.008001
                        > Average; 0.0082989
                        
                        
                        
                        DefinitionList.load Timing Tests
                        > SketchUp Version; 15.0.9350
                        > File; C;/Users/Thomas/Desktop/bed2p2.skp
                        > 0.008005
                        > 0.005998
                        > 0.008
                        > 0.007
                        > 0.008005
                        > 0.006996
                        > 0.006
                        > 0.007
                        > 0.006
                        > 0.007
                        > Average; 0.007000400000000001
                        
                        

                        The profiler will tell us exactly what it is. Thanks for the report.

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          driven
                          last edited by

                          I saved it as a componant and ...

                          DefinitionList.load Timing Tests
                          > SketchUp Version; 15.0.9349
                          > 0.033619; 0.033619
                          > 0.003637; 0.003637
                          > 0.003768; 0.003768
                          > 0.004126; 0.004126
                          > 0.003228; 0.003228
                          > 0.003331; 0.003331
                          > 0.003248; 0.003248
                          > 0.003292; 0.003292
                          > 0.003231; 0.003231
                          > 0.003322; 0.003322
                          > Average; 0.006480200000000001
                          

                          prior to that I got

                          DefinitionList.load Timing Tests
                          > SketchUp Version; 15.0.9349
                          > 1.569674; 1.569674
                          > 1.604715; 1.604715
                          > 1.554494; 1.554494
                          > 1.546019; 1.546019
                          > 1.591651; 1.591651
                          > 1.560916; 1.560916
                          > 1.561827; 1.561827
                          > 1.580865; 1.580865
                          > 1.577112; 1.577112
                          > 1.575873; 1.575873
                          > Average; 1.5723146
                          
                          

                          john

                          learn from the mistakes of others, you may not live long enough to make them all yourself...

                          1 Reply Last reply Reply Quote 0
                          • 1
                          • 2
                          • 3
                          • 3 / 3
                          • First post
                            Last post
                          Buy SketchPlus
                          Buy SUbD
                          Buy WrapR
                          Buy eBook
                          Buy Modelur
                          Buy Vertex Tools
                          Buy SketchCuisine
                          Buy FormFonts

                          Advertisement