ckirkendall / kioo

Enlive/Enfocus style templating for Facebook's React and Om in ClojureScript.
Eclipse Public License 1.0
404 stars 39 forks source link

Safari performance with Kioo-generated React nodes #60

Open OliverM opened 8 years ago

OliverM commented 8 years ago

Kioo's output causes Safari browsers to hang when moderately complex HTML structures are used. There's a discussion of this issue on the news group here: https://groups.google.com/forum/#!topic/enfocus/vfS63QhnRXs

A sample project that exhibits the issue is here: https://github.com/OliverM/kiooform

This was encountered with Kioo 0.4.1 but 0.4.2 still shows the issue.

Creighton, you mentioned there that you'd encountered a similar issue previously, did you have a chance to capture what was going on there?

OliverM commented 8 years ago

Pull request #62 shows captures the issue in the test suite

ckirkendall commented 8 years ago

I remember well the issue but I have no idea still what is going on.

Jell commented 8 years ago

I believe this is the issue: http://dev.clojure.org/jira/browse/CLJS-910

Setting :static-fns to true as a compiler option is the only way for me to run our cljs app in safari. Another way to palliated to this is to avoid nested function calls and to introduce intermediate variables everywhere, but that's not very sustainable.

Jell commented 8 years ago

PhantomJS has the same issue

ckirkendall commented 8 years ago

@jell thanks for pointing me to this.

OliverM commented 8 years ago

Thanks @jell, setting :static-fns to true resolves the issue for me (at first inspection). Fantastic to know!