Sphinx.
![]() |
I'm getting some strange results with large tables. Do you have some limit to how large tables can be or memory usage in general for a script?
|
|||||||
Posted: June 8, 2010 7:52 am | ||||||||
Vladimir Golovin
Administrator |
Uh, no idea. We'll look into this.
Edit: Could you post the sample script here? |
|||||||
Posted: June 8, 2010 7:54 am | ||||||||
Sphinx.
![]() |
Yep - it may very well be errors in the script though
![]() script:
Bitmap Buffer.ffxml |
|||||||
Posted: June 8, 2010 7:59 am | ||||||||
Sphinx.
![]() |
Hmm, I think its something else that fails, even a very small bitmap buffer causes the same problem.. still learning this lua stuff
|
|||||||
Posted: June 8, 2010 8:17 am | ||||||||
Dmitry Sapelnikov |
Heh, I've fixed this =)
Script code after bug fixing:
|
|||||||
Posted: June 9, 2010 1:32 am | ||||||||
Dmitry Sapelnikov |
The problem which caused nils was tiny.
But an approach used in the script makes it good "don't do it!" example (Sphinx, I'm sorry ![]() For all FF script programmers: Never create tables or another kind of caches without really serious purpose. Caches in scripts consumes memory really hard because caches are independently created for each rendering thread. (For exapmle, if you've got double-core processor and "use all CPU(s)" option is enabled in FF options, script component creates at least 3 copies of one cache: 2 for filter preview rendering threads, and 1 for component thumbnail rendering. BTW, I've got independent infrastructure for components which need caching. And we haven't implemented it in script components yet. |
|||||||
Posted: June 9, 2010 2:11 am | ||||||||
Dmitry Sapelnikov |
Another point of discussion is coordinate systems used in FF.
We are going to post an wiki article about it this week. |
|||||||
Posted: June 9, 2010 2:15 am | ||||||||
Vladimir Golovin
Administrator |
Egret, good point -- we should mention per-thread Lua state duplication in the help articles.
|
|||||||
Posted: June 9, 2010 2:37 am | ||||||||
Sphinx.
![]() |
Ah, of course! Remains of my first implementation where I tried to store channels in a small table for each rgba pixel/sample, but that didn't work out (maan I wish I could drag off the script tab and maximize it
![]() About the memory consumption - yes I did notice things got slow with the "large" table. I am really just testing/learning things by trying out familiar concepts from earlier projects. Are you saying that the complete script is copied for each thread or what is going on? It would be quite useful if you somehow could declare a shared variable cross threads and script components, perhaps in some sort of read only state to avoid changing data problems. Or the other way around: declare that a script is not suitable for multithreaded processing. I think that you will see several attempts to implement bitmap filters, perhaps something can be done in this regard (some sort of bitmap filter script component which is wrapped by your general bitmap filter framework, with cache tiles etc). |
|||||||
Posted: June 9, 2010 3:31 am | ||||||||
Igor Lorents
Posts: 39 |
Also, I'd like to mention an important thing about component sampling.
Filter Forge core can take samples not only in [0..Size-1] bounds. We have to take some samples outside this area to make the proper supersampling of border pixels. That's why, your execution path went through the line I marked with bold below.
You can easily check that by adding the following line before the second return statement:
After that, you'll see something like this in the log window:
Generally, I agree with Vladimir and Egret. Thanks for your post, Sphinx. Your code sample uncovers a lot of things which must be thoroughly explained in our help articles. |
|||||||
Posted: June 9, 2010 3:45 am | ||||||||
Vladimir Golovin
Administrator |
This is planned, but it won't make it into the official release of 2.0. |
|||||||
Posted: June 9, 2010 4:00 am | ||||||||
xirja
![]() |
![]() _____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|||||||
Posted: November 14, 2011 4:44 am | ||||||||
Crapadilla
![]() |
![]() --- Crapadilla says: "Damn you, stupid redundant feature requests!" ;) |
|||||||
Posted: March 1, 2015 4:23 am | ||||||||
Rachel Duim
![]() |
Add my vote. I get very slow rendering if I use the FXAA map script component in a filter with a bomber. It has no arrays, but a lot of variables (over 50, necessary given the complexity of the script). Please come up with some way to deal with these memory issues.
Math meets art meets psychedelia. |
|||||||
Posted: October 18, 2015 3:09 pm | ||||||||
xirja
![]() |
Does version 6 help this by eliminating the 32 bit 3 GB limit?
_____________________________________________________
http://web.archive.org/web/2021062908...rjadesign/ _____________________________________________________ |
|||||||
Posted: May 30, 2016 1:33 pm |
Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!
33,712 Registered Users
+19 new in 30 days!
153,534 Posts
+31 new in 30 days!
15,348 Topics
+72 new in year!
7 unregistered users.