Comments (3)
This one would be more correct example
for i in xrange(10**5):
with PyV8.JSContext() as ctx:
ctx.eval(js_code)
if i % 10000:
PyV8.JSEngine.collect()
gc.collect()
print get_mem()
Original comment by [email protected]
on 9 Apr 2014 at 1:22
from pyv8.
1. Test 1: Eval empty string
js_code = ''
(741580, 16600)
...
(741580, 16600)
Looks ok!
2. Test 2: Eval small js code
js_code = 'function hello(name) { return "Hello " + name + " from Javascript";
}'
(741576, 16596)
(741580, 16636)
(741580, 16644)
...
(747648, 22080)
Then I stopped. It leaks but not so much
3. Test 3: Eval 300Kb js file
js_code = open('bem/touch.bundles/rubric/rubric.xml.js',
'r').read().decode('utf-8')
(744060, 20436)
(745880, 21796)
(746904, 22272)
...
(1148336, 311196)
(1148336, 311556)
This is huge leak. Test finished with
PyV8.JSError: JSError: <CALL_AND_RETRY_LAST> Allocation failed - process out of
memory
Thank you in advance for any help.
Original comment by [email protected]
on 10 Apr 2014 at 6:40
from pyv8.
I think the workaround posted in my issue might help you as well, see today's
update: https://code.google.com/p/pyv8/issues/detail?id=229
Original comment by [email protected]
on 4 May 2014 at 11:55
from pyv8.
Related Issues (20)
- LookupError: unknown encoding: HOT 5
- New function to modify the maximum call stack size limit HOT 4
- Can't override eval method when inheriting JSClass HOT 2
- Compilation error HOT 7
- Compilation issue on Ubuntu 13.10 - no matching function for call to ‘CAstVisitor::InitializeAstVisitor(v8::internal::Isolate*)’ HOT 2
- Symbol not found: __ZSt20__throw_length_errorPKc HOT 2
- Builds HOT 5
- Garbage Collector not working HOT 8
- How to load contents of alert screen ?
- Update version on PyPI
- error: 'CLASSIC_MODE' is not a member of 'v8i' v8 API change ?
- REVISION
- AST can't visit object properties: No to_python (by-value) converter found for C++ type: v8::internal::ObjectLiteralProperty*
- src/Context.h:66:114: error: no member named 'HasOutOfMemoryException' in 'v8::Context'
- Help !!
- Precompiled for Debain x64 HOT 1
- Failed to pip install/build under linux x64 — lot of errors in src/Wrapper.cpp HOT 1
- segfault
- compile failed with error code 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyv8.