# Hiding Offscreen Content in Ember.js

DevFeed: [Hiding Offscreen Content in Ember.js](<https://devfeed.tech/articles/hiding-offscreen-content-in-ember-js-40625.md>)

Original publisher: [Read original article](<https://eviltrout.com/blog/2014-01-04-hiding-offscreen-ember/>)

Published: 2014-01-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Robin Ward](<https://devfeed.tech/sources/robin-ward.md>)

Topics: [Ember](<https://devfeed.tech/topics/ember.md>), [browser](<https://devfeed.tech/topics/browser.md>), [Document Object Model (DOM)](<https://devfeed.tech/topics/dom.md>), [render](<https://devfeed.tech/topics/render.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [elements](<https://devfeed.tech/tags/elements.md>), [ember](<https://devfeed.tech/tags/ember.md>), [js](<https://devfeed.tech/tags/js.md>), [memory](<https://devfeed.tech/tags/memory.md>), [render](<https://devfeed.tech/tags/render.md>)

## AI overview

This article explains how hiding offscreen content in Ember.js can reduce the browser's DOM workload and memory use. It describes Discourse's infinite-scrolling performance problem and a cloak technique that replaces offscreen views with simpler elements while preserving their height.

## Source excerpt

Everything you render in a browser, whether it's a blog post or a tweet or a video, has a performance cost. At the very least, you will be asking the browser to render a handful of tags and text elements that make up your user interface. That structure, a subtree in the browser's DOM, can be quite complicated and memory intensive. The more tags and elements you render, the slower the browser is going to perform, and the more memory it is going to use to do it. It follows that if you give the browser less work to do, it will do it faster.