Thanks, that's helpful. I don't think Inline::Lua and JavaScript::V8 meet my criterion of being installable as debian packages. (In fact, the last time I tried to get V8 working on my system, I couldn't get it to work, and I gave up.) JE actually seems like a pretty good possibility. Startup time for the interpreter is 85 ms, which is not great, but because it's accessible without shelling out, I only have to do that once. Performance is excellent once I create the interpreter object and then just call it repeatedly to evaluate the function.
EDIT: Hm, the CPAN page for JE has this: "It also uses and leaks lots of memory." Maybe it's not something I want to hitch my wagon to. | [reply] |
Hm, the CPAN page for JE has this: "It also uses and leaks lots of memory."
Yeah, good point, I missed that initially, it's definitely something worth testing. I would hope that if the JE object gets destroyed, it cleans up all of its memory, so that might be a simple workaround.
Startup time for the interpreter is 85 ms, which is not great
Initially you said "in my actual use case the performance hit might be undetectable to the person (me) using the GUI" - what kind of performance are you looking for here? Is this code going to be called in a tight loop, how often, etc.?
| [reply] [d/l] |
Initially you said "in my actual use case the performance hit might be undetectable to the person (me) using the GUI" - what kind of performance are you looking for here? Is this code going to be called in a tight loop, how often, etc.?
In the task I'm currently using this for, it gets called once for every student in the class. My classes are small, but for someone with a large class (or someone using an older machine), a delay of ~0.1 s per student could really cause a noticeable lack of responsiveness. However, I don't think that would have ended up being an issue if I had used JE, because the delay is a startup delay, and JE only needs to be started up once.
| [reply] |