hmm conflicting answers :) i guess ill try to run a test with a lot of data 
and see which approach works more consistent .. meaning doesnt leads to 
disconnects .. thanks for the input .. ill post my findings 

On Monday, July 2, 2012 8:10:19 PM UTC-5, mscdex wrote:
>
> On Jul 2, 7:28 pm, Adeel Qureshi <[email protected]> wrote: 
> > now with this approach there is only one event that gets fired at the 
> end 
> > and all the matched data is returned. this seems like would cause less 
> > network traffic but takes the realtime effect away also i am concerned 
> that 
> > if there were a lot of matches and the matches data is too big .. can 
> there 
> > be problems in transmitting large amounts of data 
> > 
> > so which approach is better. multiple events with small chunks of result 
> > data or one event at the which sends a lot of data back to browser 
>
> IMHO it's best to just do something like this: self.emit('line', line, 
> filename); 
>
> Either way it's the same amount of data in the end, but with the above 
> method, you'll use less memory. 
>
> Also, if you code it this way, you'll be all set for if you ever want 
> to show lines from a "live" log file (one that a process is currently 
> appending to) in addition to static/archived log files.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to