I am trying to think ahead to make it scalable.  In a loop to process
   messages, I want to work with one message at a time and I am using a
   JavaScript message object.  This message object basically describes
   the message and could contain large amounts of text, byte data as
   attachments, etc.  I also want to be able to process this message
   object through different filters and operations before saving it off
   to a database.  This script could also possibly be processing large
   amounts of messages.  I want to be sure that I am not going to run
   into memory problems, etc.  There is lots of information about how to
   do this efficiently in Java, but the details for Rhino and JavaScript
   are not so clear.  Normally, I would break the processing into
   functions, and then pass the message object to each function.  After
   the message is saved, I would destroy the object and then create a new
   object/instance for the next pass.  I do not want to end up with
   hundreds of these objects in memory.  Does anyone have a recommended
   way for doing this?
   Thanks,
   TonyZ
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to