I'm not sure if this is a problem with Safari/WebKit or ClojureScript (or 
neither, maybe this is expected behavior).

I implemented the game logic of my Tempest game by threading a "game state" 
structure through a long series of functions with the ->> macro.  

At some point during development, it stopped working in Safari.  By 
"stopped working", I mean loading it spikes memory usage up to insane 
levels, makes OS X unusable from all the swapfile thrashing, and makes 
Safari stop responding entirely.  It also crashes MobileSafari on iOS, 
causing them to force-quit.

I just did a little debugging to figure it out, and discovered it seems to 
be caused by having too many arguments to the ->> macro.  Commenting out 
*any* 6 of my... many more than 6 functions made it start working again.

I discovered that it runs just fine in Safari if I break the function list 
across multiple threading macros.  See this 
diff<https://github.com/mrmekon/tempest-cljs/commit/9a2ef9d57c2faa01f9d4d8883982231a7ffc90ea#diff-1>for
 the fix.

It now runs in Safari again, and in MobileSafari (miserably -- but that is 
expected.)

Is there any reason to expect this behavior, or is this a bug?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to