Musisback Posted November 10, 2010 Share Posted November 10, 2010 When I reset an PIO from a script, it takes a a pretty long time to redraw (a few second) although,it shouldn't because the PIO is very simple. (it tried with a rect(0,0,100,100) as PIO and the same think happens.) The weird thing is that when the VW file is new it works quite fast but when I work on the same file for a long time, it becomes very slow. Does anyone know what causes that and how to solves it? Thanks Quote Link to comment
Musisback Posted November 10, 2010 Author Share Posted November 10, 2010 it Has actually more to do with the number of similar action I did before. When a just opened the file, it works fine but after some action, it begins to get slow. If a close and reopen the file, it works fine again... Quote Link to comment
MullinRJ Posted November 10, 2010 Share Posted November 10, 2010 How many UNDO levels have you specified in your VW Preferences? How many objects do you have in your file? If both numbers are large, that might explain the slowdown. Closing the file and restarting the program erase your history and speed things up. This is not the only cause of a slowdown, but it's a predictable one. To test, set your undo count to 0 or 1, close the Preferences dialogue, then reset your count. If things speed up, that's probably it. If you can live with a lower number, try it. I use 20 and rarely, if ever, see unexplained slowdowns. Your mileage may vary. Raymond Quote Link to comment
Miguel Barrera Posted November 10, 2010 Share Posted November 10, 2010 If you also draw construction geometry that gets deleted at some time in the script, it will be added to the history. You can block this type of code out of the history with the BeginContext and EndContext procedures. You might also want to test how many times the PIO gets reset with the script by using the {$DEBUG} directive in the PIO script. If your code has a reset within the PIO script and an exception is not handled correctly, it could go into loop. Quote Link to comment
Musisback Posted November 15, 2010 Author Share Posted November 15, 2010 Thanks for the answers, I tried without any undo history and the problem stayed anyway. I actually changed all my object to Event enabled objects so I could set more precisely when my objects are to be updated. I works pretty fast know (maybe 20x faster) even If I not sure what the problem was. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.