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

    Game running half the speed in SU 2013 vs SU 8

    Scheduled Pinned Locked Moved Developers' Forum
    27 Posts 6 Posters 935 Views 6 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.
    • A Offline
      Anton_S
      last edited by

      In SU2013 Trimble introduced Faster Screen Redraw. I think it is the thing that slows down the fps in the animation:
      See here for SU 2013 features

      1 Reply Last reply Reply Quote 0
      • CadFatherC Offline
        CadFather
        last edited by

        Yes, but isn't that just layout?

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by

          @cadfather said:

          Yes, but isn't that just layout?

          You're right!

          I checked the time-stamps between each nextFrame (of my own tool) on both SU versions and pretty much got the same results.

          When I tested on key_scene tool, I also got different results, twice as fast on SU8 than on SU2013

          There must be something different then

          Oh, the key_scene doesn't use nextFrame, but the web-dialog action callback thing. That probably has to do with the web-dialog update speed which I know nothing about. πŸ˜’

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            Hey Renderiza, do you have a link to the plugin, and also what are you using to redraw the screen? I don't have an answer for you, but if you could do any sort of speed profiling that would be helpful. I'd like to try to get to the bottom of this one. Thanks,

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • renderizaR Offline
              renderiza
              last edited by

              Hi,

              Here is the latest version of the game for anyone interested in testing it...
              RND_Resballiza v1.0.2.rbz

              Let me also give you a little back story about the process...

              My interest in making this game started when I watched "Google I/O 2008 - Advanced Ruby Scripting for Sketchup by Scott Lininger". Here is a link: http://www.youtube.com/watch?v=FALvwBN5-hc

              Scott Lininger shared the code here http://sketchucation.com/forums/viewtopic.php?f=180&t=14291 and that served me as reference to study.

              Before starting the game for SketchUp I first made the game using just Ruby and something called Gosu. I found this website http://ruby4kids.com/ruby4kids and since I had no clue about programming it was perfect for me to start with.

              Here is a video showing the results.
              http://www.youtube.com/watch?v=XrJacQ1dOIw

              Here is link to download that game.
              https://www.dropbox.com/sh/b9wp4fnvisd0qyd/-D3fdDBkZW

              After I did the above then I started to make it for SketchUp. Here is my forum post about it. http://sketchucation.com/forums/viewtopic.php?t=48388

              Again thanks everyone for trying to help I really appreciate it! πŸ‘

              [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

              1 Reply Last reply Reply Quote 0
              • A Offline
                Anton_S
                last edited by

                πŸ˜’ I thought it was about your Key Scene plugin. It also works slow on SU2013, half the FPS as on SU8.
                Instead of using SU's nextFrame animation callback function you used your own push_frame, which was called by the callback from the dialog. On SU2013, the dialogs probably run half the speed as on SU8, since the FPS was twice as slow on SU2013.

                Edit: I commented out the push_frame function in the @@keyscene_dlg.add_action_callback block and amazingly got the same FPS on SU8 and SU2013. I was wrong, the webdialog speed is same. So, it has to do with the code inside the push_frame. Maybe some API functions were changed in SU2013 Make, and made laggy, so people would bye Pro, idk; gotta do more testing πŸ’š

                1 Reply Last reply Reply Quote 0
                • renderizaR Offline
                  renderiza
                  last edited by

                  Hi,

                  Most of the plugins I worked on use the push_frame callback using web-dialog because they are modifications of Scott Lininger is Prince IO code in which he used that to refresh the frames per second.

                  Since my involvement with coding is not that advance I simply copied that practice not being familiar with other options. This might be a good opportunity for learning more efficient techniques.

                  ...

                  Your suspicions on SketchUp 2013 Make being slower than Pro was something I had as well and here is why...Turns out that when my evaluation period of 2013 Pro ran out I then installed Make but was all of a sudden presented with a contrast in the speed & performance. Started to experience my computer to react like it was performing heavy tasks so fan will go crazy! If I remember correctly that was not happening on Pro version when I was testing it.

                  I will be interested to hear more about your tests. πŸ‘

                  [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    Anton_S
                    last edited by

                    @renderiza said:

                    ...modifications of Scott Lininger is Prince IO code..

                    Oh, I see, great person to start learning from πŸ‘

                    @renderiza said:

                    Your suspicions on SketchUp 2013 Make being slower than Pro was something I had as well and here is why...
                    I will be interested to hear more about your tests. πŸ‘

                    Found it!!!
                    entity.transform! entity.transformation.inverse This line works very slow on SU2013 and very fast on SU8...
                    Hmm... Two API functions. Which one of them lags, now?
                    Well, it doesn't matters, what matters is that Trimble ruined the API. What were they smoking? To ruin the API, it's like to ruin whole SketchUp... Great idea though, to Trimble πŸ˜† They knew that API worried us (developers) the most, and they decided to pin it down, so we'd be interested in buying Pro.

                    1 Reply Last reply Reply Quote 0
                    • renderizaR Offline
                      renderiza
                      last edited by

                      Hi,

                      @anton_s said:

                      entity.transform! entity.transformation.inverse This line works very slow on SU2013 and very fast on SU8...

                      Interesting find but that rises more questions than answers. πŸ˜•

                      @anton_s said:

                      Well, it doesn't matters, what matters is that Trimble ruined the API. What were they smoking? To ruin the API, it's like to ruin whole SketchUp... Great idea though, to Trimble πŸ˜† They knew that API worried us (developers) the most, and they decided to pin it down, so we'd be interested in buying Pro.

                      I am so hoping you are wrong with this...the mere idea of thinking if this is true or not gives me the "trimbles"!

                      I prefer to think that it was not intentional and that once they find out if indeed that was the case it will be fixed.

                      Again thanks for this tests!

                      [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        Anton_S
                        last edited by

                        @renderiza said:

                        I am so hoping you are wrong with this...the mere idea of thinking if this is true or not gives me the "trimbles"!

                        I didn't meant it seriously, I just meant it the ironic funny way... Like there were topics like "Does Trimble Listen", or πŸ˜† Or what does Trimble actually listen for? 🀣 But, I do love Trimble, I love the way they upgraded SU2013 to newer window Framework. It was actually what I wanted 😍

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

                          a question, nothing more...

                          when it reverts to "Make" are "Dynamic Components" enabled or disabled?

                          or is there no change?

                          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
                          • Chris FullmerC Offline
                            Chris Fullmer
                            last edited by

                            @John - DC's still work in Make, you just can't edit the DC functions. So you can edit the fields that are already set up by the DC maker, but you can no longer add new fields, or functions.

                            @Anton - yup, we're here listening! Trying to respond as best I can. thanks for pinning down the potential bottlenecks. I'll try to run some tests on them today and see if I can verify that I see the same behavior as you.

                            Thanks everyone,

                            Chris

                            Lately you've been tan, suspicious for the winter.
                            All my Plugins I've written

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

                              @chris fullmer said:

                              @John - DC's still work in Make... Chris

                              hi Chris, I knew they stilled worked, but isn't it 'only' if turned 'on' .

                              I remember that some recent scripts required that they are 'on' for the scripts to fully work [though they are not DC's].

                              my thinking is do those two methods have anything to do with DC's being on or off

                              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
                              • Chris FullmerC Offline
                                Chris Fullmer
                                last edited by

                                Ahh, DC's are turned on by default in Make. Is that what you mean? We don't disable them. The user would have to.

                                But I don't think either of those methods have to do with DC functions. They are both standard API methods.

                                Is that what you mean?

                                Lately you've been tan, suspicious for the winter.
                                All my Plugins I've written

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

                                  yep...
                                  what else is taken away then???
                                  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
                                  • Chris FullmerC Offline
                                    Chris Fullmer
                                    last edited by

                                    I don't think that DC's have any change in functionality or features from SU 8 to 2013.

                                    I can't think of any reason why SU Make might act differently than SU Pro in terms of cpu processing. I'll ask around though, maybe someone has an idea. When I get a chance to test the code, I'll test it on both Pro and Make. Thanks everyone,

                                    Chris

                                    Lately you've been tan, suspicious for the winter.
                                    All my Plugins I've written

                                    1 Reply Last reply Reply Quote 0
                                    • renderizaR Offline
                                      renderiza
                                      last edited by

                                      @anton_s said:

                                      I didn't meant it seriously, I just meant it the ironic funny way... Like there were topics like "Does Trimble Listen", or πŸ˜† Or what does Trimble actually listen for? 🀣 But, I do love Trimble, I love the way they upgraded SU2013 to newer window Framework. It was actually what I wanted 😍

                                      Understood! πŸ‘ I do like ironic & funny comments a lot its just that sometimes I am little slow with them. 🀣

                                      @chris fullmer said:

                                      @Anton - yup, we're here listening! Trying to respond as best I can. thanks for pinning down the potential bottlenecks. I'll try to run some tests on them today and see if I can verify that I see the same behavior as you.

                                      Chris Fullmer it means a lot that you are not only listening but also joining the conversation. I am very happy we got you as a Trimbler! πŸ‘

                                      @driven said:

                                      yep...
                                      what else is taken away then???
                                      john

                                      Not very happy to find out that some existing features for SU8 free version are being disabled for Make. 😒

                                      Idea should be to limit Make with new never before seen features so that people will be all over Pro version. That way it will not seam like a cheap marketing trick to bring people over to Pro version.

                                      There will always be bad apples working for Trimble but I have hopes since we got people like Chris Fullmer trying to do the right thing. πŸ’š

                                      Cheers!

                                      [url=https://www.sketchupcode.com/:z3kqsidd]My Extensions ...[/url:z3kqsidd]

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

                                        How is configured by default "Sketchup 2013"?
                                        I've noticed that changing this setting has strong effects on plugins that provide some kind of animation.
                                        In Sketchup 8 an option that works best for me, is as follows

                                        preferences.jpg

                                        I do not know how it is in 2013

                                        (google translate)

                                        1 Reply Last reply Reply Quote 0
                                        • Chris FullmerC Offline
                                          Chris Fullmer
                                          last edited by

                                          Ok here is the snippet I ran from a multi-line webconsole:

                                          model = Sketchup.active_model
                                          sel = model.selection
                                          gc = sel[0]
                                          t = Geom;;Transformation.new([1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,1.0,0.0,0.0,1.0,0.0,1.0])
                                          puts ""
                                          stime = Time.now
                                          model.start_operation("no fast", false)
                                          100000.times do
                                          gc.transform! t#.inverse
                                          end
                                          model.commit_operation
                                          puts "Transform Slow = " + (Time.now-stime).to_s
                                          
                                          stime = Time.now
                                          model.start_operation("fast", true)
                                          100000.times do
                                          gc.transform! t#.inverse
                                          end
                                          model.commit_operation
                                          puts "Transform Fast = " + (Time.now-stime).to_s
                                          
                                          
                                          stime = Time.now
                                          model.start_operation("slow inverse", false)
                                          1000000.times do
                                          t.inverse
                                          end
                                          model.commit_operation
                                          puts "Invert Transformation = " + (Time.now-stime).to_s
                                          
                                          
                                          stime = Time.now
                                          model.start_operation("slow", false)
                                          100000.times do
                                          gc.transform! t.inverse
                                          end
                                          model.commit_operation
                                          puts "Combined Slow = " + (Time.now-stime).to_s
                                          
                                          
                                          stime = Time.now
                                          model.start_operation("fast", true)
                                          100000.times do
                                          gc.transform! t#.inverse
                                          end
                                          model.commit_operation
                                          puts "Combined Fast = " + (Time.now-stime).to_s
                                          

                                          Here are the results from 3 rounds of tests:
                                          SU 8
                                          ` Transform Slow = 7.457
                                          Transform Fast = 1.429
                                          Invert Transformation = 0.55
                                          Combined Slow = 7.442
                                          Combined Fast = 1.437

                                          Transform Slow = 7.391
                                          Transform Fast = 1.446
                                          Invert Transformation = 0.555
                                          Combined Slow = 7.458
                                          Combined Fast = 1.437

                                          Transform Slow = 7.43
                                          Transform Fast = 1.431
                                          Invert Transformation = 0.553
                                          Combined Slow = 7.479
                                          Combined Fast = 1.456`

                                          SU 2013
                                          ` Transform Slow = 0.789
                                          Transform Fast = 0.42
                                          Invert Transformation = 0.529
                                          Combined Slow = 0.841
                                          Combined Fast = 0.422

                                          Transform Slow = 0.779
                                          Transform Fast = 0.419
                                          Invert Transformation = 0.53
                                          Combined Slow = 0.841
                                          Combined Fast = 0.419

                                          Transform Slow = 0.806
                                          Transform Fast = 0.421
                                          Invert Transformation = 0.532
                                          Combined Slow = 0.834
                                          Combined Fast = 0.42`

                                          So without the go_faster flag, I'm seeing SU 2013 doing the transformations about 10 times faster than it was in SU 8. Its even going about twice as fast as SU 8 with the go_faster flag.

                                          Su 2013 appears to be about three times faster than 8 was when using the go_faster flag.

                                          The transformation.inverse does not seem to have changed from SU 8 to 2013. I'm realizing I deleted the test from these results, but I had tested it with and without the go_faster flag and saw no difference. I could update it to do that again if it would help.

                                          Does anyone see any holes in these tests? I could easily have overlooked something.

                                          Chris

                                          Lately you've been tan, suspicious for the winter.
                                          All my Plugins I've written

                                          1 Reply Last reply Reply Quote 0
                                          • A Offline
                                            Anton_S
                                            last edited by

                                            Your amazing Chris πŸ‘
                                            Adding model.start_operation('KeyScene', true) when the user clicks the start button and calling model.commit_operation when user clicks the reset button seems to increase performance dramatically!

                                            I take all my thoughts back, and do say that Trimble SU2013 is an extreme progression!!!

                                            Thank you SketchUp Team!
                                            Thank you Trimble!
                                            Thank you Chris!

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

                                            Advertisement