# Rerendering on widget keyUp / keyDown?

**URL:** <https://meta.discourse.org/t/rerendering-on-widget-keyup-keydown/61461>\
**Category:** Development\
**Created:** [23. April 2017 um 14:02 UTC](https://meta.discourse.org/t/rerendering-on-widget-keyup-keydown/61461 "2017-04-23T14:02:30Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)\
**Post date:** [1. Mai 2017 um 19:20 UTC](https://meta.discourse.org/t/rerendering-on-widget-keyup-keydown/61461/5 "2017-05-01T19:20:13Z")

</div>

Are the posts in the window using the `shadowTree` property that our [post stream](https://github.com/discourse/discourse/blob/master/app/assets/javascripts/discourse/widgets/post.js.es6#L387) does?

If you set that attribute, the virtual dom will not diff the contents of posts on a typical re-render. It _will_ diff if something inside the post triggers the render (such as an action on a button on it).

You might notice a huge speed improvement if you implement this. Of course, it makes the assumption that posts only change as a result of interacting with them directly.

---

_[View the full topic](https://meta.discourse.org/t/rerendering-on-widget-keyup-keydown/61461)._
