0

I am investigating using JavaScript in Chrome to display transaction data for a kitchen display system. I am wondering how robust this would be for client side JavaScript fetching data from a server and updating the displayed information for hundreds of transactions, days at a time.

The basic architecture is to have a web page to display transaction items in several columns, one column per transaction. As the order is assembled and then given to the customer, the transaction would be bumped meaning it would be removed from the display. As new transactions are fetched from the server, the displayed list of transactions would be updated with the new transactions. Bumping a transaction will cause transactions displayed to the right to ripple down to fill in the now empty column.

My concern is whether using JavaScript to drive a Client display will have the necessary resource garbage collection so that it will be able to run for days at a time while dynamically updating and changing the displayed information.

There seems to be two tasks: (1) fetching the data from the server and (2) updating the displayed information through document DOM manipulation.

I would assume that different browsers using different JavaScript engines would have different robustness characteristics. Is there any information on the subject of JavaScript engine robustness when used under similar conditions?

Richard Chambers
  • 16,643
  • 4
  • 81
  • 106
  • The only point I don´t follow is who will use this, only you or users? It´s not normal to leave a tab open for days, and even when it gets out of focus, some events are not fired in some browsers – juvian Apr 14 '16 at 17:25
  • @juvian, the idea is to have a small, standalone, single purpose box running Chrome in kiosk mode driving a display. It would be used by other people and they would be depending on it to work for long periods of time without any kind of user action other than bumping transactions. – Richard Chambers Apr 14 '16 at 17:37
  • 1
    Js garbage collection is not perfect, but as long as you write clean code, the overhead should be little. Still, the only way to really see if it works or not is making a relevant test and 'simulate' days of use. Also, this might be helpful if you decide to use Chrome: http://stackoverflow.com/questions/13950394/forcing-garbage-collection-in-google-chrome – juvian Apr 14 '16 at 17:50
  • @juvian thanks for the link to the stackoverflow question about forcing garbage collection. linked to that question was [What is JavaScript garbage collection?](http://stackoverflow.com/questions/864516/what-is-javascript-garbage-collection) which provides some additional information as well. The "Forcing garbage collection in Google Chrome" was interesting especially the answer about Chrome leaking DOM nodes at one time. Also helpful, [Garbage collection in google-chrome extensions](http://stackoverflow.com/questions/5747948/garbage-collection-in-google-chrome-extensions). – Richard Chambers Apr 14 '16 at 18:41
  • 1
    If you decide to go ahead with this, feel free to post your code at codereview to ask for performance/garbage collection improvements – juvian Apr 14 '16 at 18:45
  • [Using Chrome Developer Tools to Find Memory Leaks](https://blog.newrelic.com/2012/07/17/using-chrome-developer-tools-to-find-memory-leaks/), [High-Performance, Garbage-Collector-Friendly Code](http://buildnewgames.com/garbage-collector-friendly-code/), [Finding and debugging memory leaks in JavaScript with Chrome DevTools](http://www.slideshare.net/gonzaloruizdevilla/finding-and-debugging-memory-leaks-in-javascript-with-chrome-devtools), [Effectively Managing Memory at Gmail scale](http://www.html5rocks.com/en/tutorials/memory/effectivemanagement/) – Richard Chambers Apr 15 '16 at 04:38
  • [does manual garbage collection of DOM elements in jquery improve browser performance at all?](http://stackoverflow.com/questions/9153832/does-manual-garbage-collection-of-dom-elements-in-jquery-improve-browser-perform), [How to remove DOM elements without memory leaks?](http://stackoverflow.com/questions/3785258/how-to-remove-dom-elements-without-memory-leaks), [add/remove listeners on javascript ( garbage collector )](http://stackoverflow.com/questions/28273199/add-remove-listeners-on-javascript-garbage-collector) – Richard Chambers Apr 15 '16 at 14:32

0 Answers0