-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature suggestion: compile scripts #95
Comments
@rosmo — Yeah that might just make a bit more sense. I wonder what others think? |
👍 ... but I think we should leave |
Sounds good. I already wrote preliminary version of the changes needed, but I'll polish them a bit. I chose the resource way, since it's much less work. |
Here's the changes: https://github.com/rosmo/v8js/commits/compile-script |
Hi @rosmo, please see my inline comments to your commits. Besides that
cheers |
Totally forgot about checkString(). And you're right about the duplication. I'll fix the issues ASAP. |
Here's a better branch: https://github.com/rosmo/v8js/commits/compile-script-fix I'm not sure about the last commit though, because I'm not that familiar with V8. I thought the previous style was leaking memory, but it seems like the leaking is happening with the master branch as well (Apache's RSS seems to grow and not stabilize). |
The memory leak could be issue #71 related though. |
I updated the compile branch: https://github.com/rosmo/v8js/commits/compile-script-201409 |
@rosmo thanks for your contribution! I just changed cheers |
hmm, seems like this breaks the test 3.29.1 regularly crashes with this trace
|
hmmm, I'll close this again, since it doesn't seem to be the cause of the problem. The problem probably is still only the stack unwinding stuff, the commit above makes it better but it's still not stable. Jenkins tells v8 versions 3.29.54 to 3.29.66 are unstable (i.e. the aforementioned test fails) and all other versions from 3.27.1 on are stable. However I cannot verify that on a second box. And I just now noticed that subsequent requests (within the same php process) to one with a unwound fatal error just fail. I'll follow up with a specific bug report. |
Could we blacklist some versions if they are unstable? |
@rosmo I don't think that blacklisting is the way to go. The unwinding still has its flaws (two less since today, but still at least one more) and leads to crashes here and there. I can reproduce crashes with versions 3.29.54 to 3.29.66 on two boxes with PHP 5.4; but not with 5.5 (which crashes with 3.25.30 though). |
@stesie There is a difference/bug when doing previous executeString and executeScript (we noticed this while doing an upgrade). I will try to produce a test case for this. |
V8Js::executeString() now compiles and runs scripts each time it's called. It might be worth to add a V8Js::compileString() method which returns a resource for the compiled script and a V8Js::runScript() function to execute them.
The text was updated successfully, but these errors were encountered: