[0:09]<olivvv_> What would be the fastest to show/hide a bunch of html [0:09]<olivvv_> 1. remove it from the dom and insert it back when needed [0:09]<olivvv_> 2. Parse a template with the right data every time it is asked [0:10]<ashb> olivvv_: 3. use your JS framework and set the display style to none [0:10]<olivvv_> no [0:10]<olivvv_> hiding with css produces a too big dom [0:11]<ashb> define to obig [0:11]<olivvv_> everything is then slowed down [0:11]<olivvv_> thousand of nodes [0:11]<ashb> you actually tested this, or are guessing? [0:11]<ashb> and if you tested the first, test both of hte others andsee [0:11]<ashb> but bear in mind the answer is likely to change form browser to browser [0:12]<ashb> (IE6 to IE8 to FF3 etc) [0:12]<olivvv_> If I had tested all options I wouldn't ask [0:12]<olivvv_> well, we focus on IE7 [0:12]<olivvv_> IE6 is not supported [0:12]<olivvv_> and all others are faster [0:13]<ashb> are all these nodes contained in a single node that can easily be removed or not? [0:13]<olivvv_> hum, probably [0:13]<ashb> then i'd suspect that remove that one element would be quicker [0:13]<olivvv_> (I dont have the app here, I'm at home) [0:13]<ashb> but test things :) [0:13]<ashb> its never a problem i've had before [0:14]<olivvv_> it is a single load application [0:15]<olivvv_> I believe its js is also problematic, but the dom size seems to be the first culprit [0:16]<olivvv_> Is there other people here working on single load applications ? [0:20]<olivvv_> I'd like to share experience on development of single load js apps, but I dont know how to find the right people. It seems that there is no dedicated place on the Internet... [0:21]<olivvv_> Most web performance literacy assume "normal" web pages [0:22]<olivvv_> not webpages that are loaded only once a day [3:51]* Dantman rolls the idea of a bot war game that involves programming in javascript around his head [9:22]<ondras> hmm [9:22]<ondras> libev or libevent [9:22]<ondras> do you guys have any recommendation? [9:22]<ondras> also, their docs are not exactly easy to understand, at least to me [9:23]<ondras> I am looking for a simple, reliable and _portable_ way to implement {set,clear}{Timeout,Interval}... [9:42]<Dantman> why does async need a c library like those? [9:44]<Dantman> Create a queue, add functions that add to it, execute the user javascript, then continually pull functions from the queue and run them until the queue has become completely empty of any function [9:47]<Dantman> To order things and allow for needed blocking implement a queue like Java's DelayedQueue [9:47]<Dantman> a little more advanced if you want Intervals the way browsers do it [9:48]<Dantman> ^_^ My little mini project is probably going to end up with me adding some mini-async using some JS and LiveConnect [10:29]<ondras> Dantman: can you be more specific? [10:38]<Dantman> ondras, On which? [10:39]<ondras> 10:43 < Dantman> why does async need a c library like those? [10:39]<ondras> 10:45 < Dantman> Create a queue, add functions that add to it, execute the user javascript, then continually pull functions from the queue and run them until the queue has become completely empty of any function [10:39]<ondras> I am not sure I understand [10:39]<ondras> how a function queue relates to setTimeout implementation [10:41]<Dantman> http://github.com/dantman/monkeyscript.lite/blob/master/src/common/org/monkeyscript/lite/MonkeyScript.java#L61-65 [10:41]<Dantman> http://github.com/dantman/monkeyscript.lite/blob/master/src/common/org/monkeyscript/lite/Global.java#L212-246 [10:44]<Dantman> At least in terms we're talking about in js; async works by creating a queue of things to execute, running some sync code that includes code that populates that queue, then once that code is run you go through the queue and execute thing after thing until completely exhausted [10:44]<ondras> okay, I have no DelayQueue and no DelayFunction - and I have no java [10:44]<ondras> my embedding is c/c++ [10:45]<Dantman> Ya, but that is all just a fancy prebuilt queue... [10:45]<ondras> import java.util.concurrent.DelayQueue; [10:45]<ondras> this is what I am missing [10:46]<Dantman> DelayFunction is my doing, it's just a class that implements the Delay interface and contains a reference to the function that is to be called [10:46]<Dantman> DelayQueue is just a timed queue implementation [10:46]<ondras> ...and I have no such thing [10:47]<Dantman> Which still doesn't stop you from writing one [10:47]<ondras> actually, I have no idea how to do that [10:49]<Dantman> All the delay queue does is order a queue... It's basically a list of things, it orders them in the order they will expire, and when requested spits out the first expiring item making sure to block or not export any item if nothing has expired yet [10:50]<ondras> I have a feeling of talking completely orthogonally :) [10:50]<ondras> say I need to schedule function execution in 100msec [10:50]<ondras> and then perform sleep(10000) [10:51]<ondras> in c. [10:54]<ondras> (afk lunch) [22:27]<ashb> i wonder how people thing a C Module API would work [22:27]<ashb> since for it to work, it would have to paper over the difference between the different JS engines [22:28]<ashb> which is basically what flusspferd aims for.... [22:59]<inimino> ashb: what's a C module? Some kind of JavaScript ? C FFI? [22:59]<ashb> inimino: last or (near last) slide in kriskowals talk [22:59]<ashb> and on the wiki [22:59]<ashb> inimino: but yes - some kind of JSNI [23:00]<inimino> ah [23:00]<ashb> FFI was a separate point tho [23:01]* ashb goes back to playing at being a sysadmin [23:03]<ashb> http://wiki.commonjs.org/wiki/C_API [23:04]<ashb> inimino: ^^ that infact [23:04]<ashb> so a FFI is useful. a C api for writing C modules in in flusspferd, but with C instead of C++ [23:05]<inimino> ashb: thanks, was just getting there :) [23:05]<inimino> yeah, that would be quite nice [23:05]<ashb> so gpsee (wes's project) has a FFI module [23:05]<inimino> pulling in all that existing C-library goodness [23:06]<ashb> of course going C++ via FFI is impossible [23:06]<ashb> or near on impossible [23:06]<ashb> due to name mangling [23:06]<ashb> i'm thinking of things like mongodb which only has a C++ api, not a C one [23:28]<inimino> ashb: yeah, this is why libraries should always have at least a stub C api [23:28]<ashb> not an issue for me [23:28]<ashb> writing C++ modules for flusspferd is really easy