News for hackers. Stuff that matters.
Re:Notch trying jsFiddle by undergroundhero on Sunday December 02, 2012 @06:46PM (#4863142)
Thanks for the livecoding link. I assume there's some overhead in constantly checking for and applying code changes - that's probably the reason for the lower frame rate.
Re:Notch trying jsFiddle by scottyallen on Sunday December 02, 2012 @06:51PM (#4863155)
Good point, I hadn't thought about the fact they might be polling for changes. Might be better if livecoding used an event based model to check for updates...
Re:Notch trying jsFiddle by akx on Monday December 03, 2012 @04:06AM (#4864583)
Or if it works at all like Scrubby (http://nornagon.github.com/scrubby/) which was on HN a couple days ago, it might rewrite all constants into global lookup table indexes, which surely wreaks havoc on performance.
Re:Notch trying jsFiddle by dxq on Monday December 03, 2012 @04:33PM (#4867981)
How do you suppose event-based models are notified of changes? Ultimately you are still polling, you're just abstracting it out of your higher-level design.
Re:Notch trying jsFiddle by enjalot on Monday December 03, 2012 @09:14PM (#4869172)
it's not polling, its reevaluating code when codemirror triggers an event for text changing (which uses the dom underneath).

the problem is from calling setInterval every time the code is evaluated, leading to way too many function calls/second