Loading ...
Sorry, an error occurred while loading the content.

Memory Consumption

Expand Messages
  • sandyhead25
    Is there some guidance or best practice for writing JavaScript applications with regard to efficient use of memory. For instance, are constructors better than
    Message 1 of 3 , Jan 21, 2011
    • 0 Attachment
      Is there some guidance or best practice for writing JavaScript applications with regard to efficient use of memory. For instance, are constructors better than named functions? Are parallel arrays less efficient than nested arrays? Object literals versus arrays? If a large JavaScript application requires a large memory space is that space returned after the application exits? Do each of these questions vary by interpreter?

      I can completely confident I can write fast and stable JavaScript, but I fear if memory concerns are ignored then speed is only a one time achievement.

      I am not concerned about anything related to the DOM. I will simply concede that any access to the DOM by JavaScript is inherently slow, bloated, and can sometimes result in a memory leak in some versions of IE. I am only concerned with JavaScript and its management of internal structures.
    • Felix E. Klee
      On Fri, Jan 21, 2011 at 6:25 PM, sandyhead25 ... There is some info in the Google JavaScript Style Guide, for example:
      Message 2 of 3 , Jan 21, 2011
      • 0 Attachment
        On Fri, Jan 21, 2011 at 6:25 PM, sandyhead25 <austin.cheney@...>
        wrote:
        > Is there some guidance or best practice for writing JavaScript
        > applications with regard to efficient use of memory.

        There is some info in the Google JavaScript Style Guide, for example:

        <url:http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.x
        ml#Closures>
      • Marcel Duran
        ... I suggest Nicholas Zachas et al - High Performance JavaScript ( http://www.amazon.com/Performance-JavaScript-Faster-Application-Interfaces/dp/059680279X/ )
        Message 3 of 3 , Jan 21, 2011
        • 0 Attachment
          >
          > Is there some guidance or best practice for writing JavaScript applications
          > with regard to efficient use of memory.
          >
          I suggest Nicholas Zachas et al - High Performance JavaScript (
          http://www.amazon.com/Performance-JavaScript-Faster-Application-Interfaces/dp/059680279X/
          )

          --
          Marcel Duran


          [Non-text portions of this message have been removed]
        Your message has been successfully submitted and would be delivered to recipients shortly.