Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problem I had with getters in a fairly complex application (WYSIWYG editor) was handling mouse events, in particular onMouseMove - change detection was triggered on every such event, and the application was very slow. EDIT: It was slow because there were many getters based on other getters etc and everything was recalculated on each event.


I don’t think a computed property would behave any better. It sounds like your event handling should have been decoupled from change detection and only applied changes when necessary. This would probably be a problem in any framework.


This is an issue with zone.js + getters, I changed the key components to OnPush change detection.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: