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

    Model refresh issues on Windows

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 207 Views 3 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.
    • J Offline
      jeemang
      last edited by

      I'm working on a pretty complicated plug-in used to render curtainwall in Sketchup. We're having some trouble with the performance of the plug-in in Windows, so I thought I'd see if I could get some insight.

      Specifically, the model doesn't seem to be redrawing at the rate that Ruby appears to be processing operations. This can be seen in the below video:

      In this video, I've set up a simple test slider (a jQuery UI widget, for what it's worth) that sends mullion spacing values to Ruby based on the position of its handle. I've coded the slider to record the clock reading when it sends queuries to Ruby, and to not send a queury if the time since the previous query is below a specified threshold. At the beginning of the video, I set the delay to zero, meaning all requests are sent instantly. As the video shows, the resulting performance is quite jerky.

      I tested exactly this configuration on OSX and got much smoother performance. When looking into this discrepancy, I added code to print clock readings to the console after operations of interest, and found that, on Windows, queries were actually being sent about 2.5 more frequently than they were on OSX. It got me thinking that perhaps requests were being sent to Windows too frequently.

      So, in the video, after I set the delay to zero and move the slider around a bit, I then set it to 60 ms. As the video shows, the resultant performance is much smoother. So, despite the fact Ruby is receiving and executing less queries, modifications to model are registering to the screen more rapidly.

      What makes this particularly puzzling is that Ruby seems to think it's completing all of the operations resulting from queries despite not actually doing so. In the final part of the video, I set the delay back to 0, and open up the Ruby console. We've set up the Ruby side of the plug-in code to report the model redraw time after it completes a redraw operation. The video shows that Ruby produces about a dozen or so of these messages for every frame or two of on-screen adjustment. This suggests a disconnect between what Ruby is doing and what it's displaying.

      By way of possible solutions: we've built a queuing mechanism into the software that holds queries in an array in javascript and only sends them to Ruby if the queue was previously empty or if it receives confirmation from Ruby that the previous query was dealt with. It doesn't help in this case, however, because, as I mentioned, Ruby thinks it's completing the requested operations (and probably is; it just isn't displaying them).

      Has anyone dealt with any similar problems? Any insight would be very much appreciated.

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

        First response,

        Parallels uses software acceleration for rendering, so SU can't access the same native 'hardware' acceleration you'll see in mac SU.

        You need to use BootCamp or a PC

        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
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          Did you read ThomThom's: WebDialogs - The Lost Manual — R1 2009NOV09
          specifically the section on "Async vs sync Communication"

          I'm not here much anymore.

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

          Advertisement