Skip to content

Commit

Permalink
[embedlite] Limit the number of active layers
Browse files Browse the repository at this point in the history
  • Loading branch information
rojkov committed Jun 11, 2015
1 parent 6bf67df commit 5d9f7fa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions embedding/embedlite/embedding.js
Expand Up @@ -45,6 +45,12 @@ pref("layers.use-deprecated-textures", false);
pref("layers.enable-tiles", true);
pref("layers.async-pan-zoom.enabled", true);
pref("font.size.inflation.disabledInMasterProcess", true);
// We want to limit layers for two reasons:
// 1) We can't scroll smoothly if we have to many draw calls
// 2) Pages that have too many layers consume too much memory and crash.
// By limiting the number of layers on mobile we're making the main thread
// work harder keep scrolling smooth and memory low.
pref("layers.max-active", 20);

// APZC preferences.

Expand Down

0 comments on commit 5d9f7fa

Please sign in to comment.