# Performant method of maintaining user's scroll position

**URL:** <https://discuss.emberjs.com/t/performant-method-of-maintaining-users-scroll-position/3387>\
**Category:** Uncategorized\
**Created:** [November 19, 2013, 2:05am UTC](https://discuss.emberjs.com/t/performant-method-of-maintaining-users-scroll-position/3387 "2013-11-19T02:05:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dylanstaley](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/dylanstaley/32/15302_2.png) [@dylanstaley](https://discuss.emberjs.com/u/dylanstaley)\
**Post date:** [November 19, 2013, 2:05am UTC](https://discuss.emberjs.com/t/performant-method-of-maintaining-users-scroll-position/3387/1 "2013-11-19T02:05:55Z")

</div>

Given a simple application that loads a list of messages (with new messages appearing in real time on the top of the list), what is the most performant method of maintaining the user’s scroll position?

I’ve built a [simple demo application on JSBin](http://jsbin.com/ucanam/2174/edit?js,output), which shows a method that appears to perform well. However, when using an actual data source (Firebase in my case), there’s some updates that seem to flicker the page. @trek guesses that the flicker is “the brief time between render and the current runloop triggering the scrollto”.

To demo the application, simply click the “New Tweet” button a couple of times to generate a list of tweets long enough to warrant scrolling. Then, scroll down, and click the “New Tweet” button again to add a new element to the top of the list.
