Sphinx.
![]() |
The current prepare function is called before a rasterization starts (correct me if I'm wrong). However if the source has not changed, this could lead to unnecessary processing.
Is it possible somehow to do a "lazy" preparation that only process if source(s) has changed? Example: I search through the source for minimum and maximum values. As long as the source has not changed I don't need to reevaluate its data. What would be the best script approach for the example? |
|||||
Posted: June 9, 2010 5:47 am | ||||||
Vladimir Golovin
Administrator |
Don't forget that we have unsafe scripts that can pull their data from sources other than Filter Forge -- see our Real-World Clock example.
|
|||||
Posted: June 9, 2010 6:25 am | ||||||
Lucato
![]() |
Does that mean, that we can have the risk to execute a script that will execute some other stuff that can be a virus or other bad stuff? Does FF warn 1st if a script has an external connection or try to connect to something different from FF? There is some risk for our computers/users? |
|||||
Posted: June 9, 2010 7:59 am | ||||||
Vladimir Golovin
Administrator |
Yes.
FF has two layers of protection, both configurable in Tools > Options > Scripts. First, execution of unsafe scripts is disabled by default -- no unsafe script can execute unless this setting is enabled. If you want safety, you should never turn it on. And second, when you try to open a filter containing an unsafe script, FF asks you for confirmation. If you want, you can configure it not to open such filters at all (but be advised that copying such filters directly to My Filters folder bypasses these warnings.) Additionally, all script components are set to 'safe' mode by default, and we don't accept filters with unsafe scripts to the Filter Library. BTW, have you read the last section of our Beta Stage 4? It contains info on unsafe scripts -- scroll it to the bottom: http://www.filterforge.com/download/b...pting.html |
|||||
Posted: June 9, 2010 8:39 am | ||||||
Lucato
![]() |
Thanks for the extra explanation Vlad. I appreciated that.
Just a last doubt. When you mentioned above: "(but be advised that copying such filters directly to My Filters folder bypasses these warnings.)" Does it skip just the 3 questions and not the "Unsafe..." checkbox marked as unchecked, right? I mean, if I copy a filter to "My Filters" will I still be protected by the unchecked "Enable execution of unsafe scripts", right? |
|||||
Posted: June 9, 2010 9:58 am | ||||||
Vladimir Golovin
Administrator |
Right -- the checkbox cannot be bypassed this way. Also, you can't write a script using unsafe functions and then turn it into a safe script by hacking the XML to set the 'safe' property to TRUE -- this won't work, the unsafe functions won't be available. |
|||||
Posted: June 9, 2010 12:12 pm | ||||||
Lucato
![]() |
Great, it's good to know we are safe if not touch that checkbox. Thanks :0) |
|||||
Posted: June 9, 2010 4:25 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,711 Registered Users
+18 new in 30 days!
153,533 Posts
+31 new in 30 days!
15,348 Topics
+73 new in year!
21 unregistered users.