In this chapter, we examine another optimization pattern, the flyweight. It's most useful in situations where large numbers of similar objects are created, causing performance problems. This pattern is especially useful in JavaScript, where complex code can quickly use up all of the available browser memory. By converting many independent objects into a few shared objects, you can reduce the amount of resources needed to run web applications. The benefit of this can vary widely. For large applications that can potentially be used for days at a time without being reloaded, any technique that reduces the amount of memory used can have a very positive effect. For small pages that won't stay open in the browser for that long, memory conservation isn't as important.
CITATION STYLE
The Flyweight Pattern. (2008). In Pro JavaScript Design Patterns (pp. 179–195). Apress. https://doi.org/10.1007/978-1-4302-0496-1_13
Mendeley helps you to discover research relevant for your work.