cljs.js: Memory perf on JSC for first defn evaluation

Description

If you evaluate something like (defn f []) via cljs.js/eval-str with JavaScriptCore, a spike in memory will occur and it will take several seconds to complete the evaluation. After this, subsequent evaluations don't exhibit this behavior. Also, this doesn't occur for Firefox or Chrome.

Additionally, it did not occur previously with bootstrapped ClojureScript when we were building things outside of `cljs.js` (it doesn't occur in Replete, for example, nor the earlier versions of Planck: https://youtu.be/AMT63rxK4E8).

You can see it for yourself at http://ClojureScript.net (you can see the slowness in desktop Safari, and on an iPhone it exhausts memory).

Environment

None

Attachments

1

Activity

Mike Fikes July 30, 2015 at 11:06 PM

This is the same as CLJS-910. An easy workaround is :static-fns true.

Mike Fikes July 30, 2015 at 4:58 PM

Attached memory.png, which shows what happens in Planck when you do (defn f [])

Duplicate

Details

Assignee

Reporter

Priority

Created July 30, 2015 at 4:54 PM
Updated July 30, 2015 at 11:06 PM
Resolved July 30, 2015 at 11:06 PM