Js2Py icon indicating copy to clipboard operation
Js2Py copied to clipboard

Memory leak

Open BarryThrill opened this issue 6 years ago • 0 comments

a simple script of

#!/usr/bin/python

import js2py and running that with valgrind shows us

==30724== HEAP SUMMARY:
==30724==     in use at exit: 1,281,479 bytes in 431 blocks
==30724==   total heap usage: 35,563 allocs, 35,132 frees, 158,893,439 bytes allocated
==30724==
==30724== LEAK SUMMARY:
==30724==    definitely lost: 0 bytes in 0 blocks
==30724==    indirectly lost: 0 bytes in 0 blocks
==30724==      possibly lost: 1,072 bytes in 2 blocks
==30724==    still reachable: 1,280,407 bytes in 429 blocks
==30724==         suppressed: 0 bytes in 0 blocks
==30724== Rerun with --leak-check=full to see details of leaked memory

Basically a normal script would run around 50mb. Using js2py took around 150mb+.

Issue that I got help from https://github.com/VeNoMouS/cloudflare-scrape-js2py/issues/23#issuecomment-483062871

BarryThrill avatar Apr 14 '19 23:04 BarryThrill