Sphinx.
![]() |
I'd like to hook up Lua Profiler - is it possible? And if so, how is it done?
|
|||
Posted: June 16, 2010 3:05 am | ||||
Vladimir Golovin
Administrator |
I don't think it can be used within / together with FF, but, I guess, nothing prevents you from implementing a standalone Lua program with some code calling the prepare() and get_sample() functions, say, while traversing pixels of a bitmap. This setup lets you profile scripts outside of FF. To better emulate FF execution environment, make sure you're executing Lua with debug hooks turned on, and without LuaJIT.
|
|||
Posted: June 16, 2010 5:09 am | ||||
Sphinx.
![]() |
Ok, hmm I had hoped it was possible hooking up the profiler in unsafe mode (while developing / debugging).
Perhaps you could evaluate if its worth adding the profiler to your lua setup (so its available by default). Being able to profile the performance critical parts of a script is a great help. I'm currently trying out LuaEdit (of course temporarily, because I'm sure we will soon get a build-in kick ass editor ![]() |
|||
Posted: June 16, 2010 5:22 am | ||||
Vladimir Golovin
Administrator |
These examples were written when we had a simple text edit box instead of the code editor we have now, buggy error handing, etc. The code was written in Notepad++ and pasted into the edit box. |
|||
Posted: June 16, 2010 6:13 am | ||||
Vladimir Golovin
Administrator |
What, in your opinion, is missing in our current one (except for the editing area width?) |
|||
Posted: June 16, 2010 6:14 am | ||||
Sphinx.
![]() |
What I miss the most is overview and editing room. The fact that the editor is attached to the main editor window is quite annoying; being able to have the editor in a separate window that does not change along with the component selection in the workspace, would be really helpful (the editor could have a list/tabset/something of available scripts corresponding to the no. of script components in your filter).
In the actual editing situation I miss the following: search replace tools, code hinting*, line numbers and function list shortcuts (the latter mainly because of the restricted area) *code hinting: You already have a list supported functions and global variables internally somewhere, these could pop up in code hints as you type. For example typing the dot in "math." opens up available math functions in a list. I'm sure you know what I mean, its standard in many editors ("code hint", "code insight" .. there are names for the same thing) |
|||
Posted: June 16, 2010 6:55 am | ||||
Sphinx.
![]() |
![]() |
|||
Posted: June 16, 2010 6:57 am | ||||
Totte
![]() |
+1 on standalone editor window with a tab for each script component. I find myself very often tweak inputs while looking at code. Having the codeeditor as it is now can easily be described ad one of my clients once described something :
It is like when the monkey made love to the giraffe and wanted to kiss all the time... - I never expected the Spanish inquisition |
|||
Posted: June 16, 2010 7:25 am | ||||
James |
Well just my opinion but - Line numbering and current position lost on apply or show the desktop etc, i know there is the line position thing which is good but rather than clicking to find a line i prefer it numbered by default. Being restricted to a set area you can't move around and minimize is also a problem, i also code in notepad++ and then copy and paste it in maybe with a bit of editing after if needed. There is also the long time thing that has annoyed me about FF which is forced re-rendering and the way it jumps up to 100% cpu constantly rather than to just press a button when ready. What i do instead is to lock it to a quick rendering preview like a image input or gradient but this is an annoying workflow in my opinion and that also another reason why i have been writing scripts in a external editor. Maybe it would be a good idea to have customization over the main preview and have things like push a button to render or allow to disable or resize it down so there is more room to code etc and it's not in the way of things. I know some people like it but i don't and to me the way the program automatically renders is probably one of my only dislikes about FF now. Having more control over that system would improve things greatly and also be much nicer for scripting in my opinion. |
|||
Posted: June 16, 2010 8:16 am | ||||
Sphinx.
![]() |
Did you run into global variables strangely being nil where they shouldn't? I'm fighting that a lot: I go over the script, double check things, inspect variables and when known to be assigned I find them unassigned later on.. its soo confusing |
|||
Posted: June 16, 2010 11:11 am | ||||
Vladimir Golovin
Administrator |
No, we didn't. Perhaps this is due to typos? Lua doesn't require variable declaration, so typos in variable names will create new variables. |
|||
Posted: June 16, 2010 11:22 am | ||||
Sphinx.
![]() |
No, I figured it out GRR.. those damn tables, they are treated as pointers, even when assigning to a new variable. Consider the following example:
a = {5} b = a a[1] = 7 error(b[1]) so log says? .. 5? Nopes.. 7! Imagine passing a few "vectors" around btwn functions.. its a damn mess I'm cleaning up now ![]() |
|||
Posted: June 16, 2010 12:13 pm | ||||
StevieJ
![]() |
+2 Yeah, I dislike that too.....unnecessary re-renders when saving.....seems to happen above a certain sized image and/or filter complexity.....and not for images that are like 1024 x 768 and below..... Steve
"Buzzards gotta eat...same as worms..." - Clint :) |
|||
Posted: June 16, 2010 1:39 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,531 Posts
+36 new in 30 days!
15,347 Topics
+72 new in year!
16 unregistered users.