The Flyweight Pattern

N/ACitations
Citations of this article
1Readers
Mendeley users who have this article in their library.
Get full text

Abstract

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.

Cite

CITATION STYLE

APA

The Flyweight Pattern. (2008). In Pro JavaScript Design Patterns (pp. 179–195). Apress. https://doi.org/10.1007/978-1-4302-0496-1_13

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free