aurelia / aurelia/documentation

Help with optimization

Open
#291 2 comments 2 reactions 0 assignees View on GitHub
documentation
Dominant language
No language data
Stars
104
Forks
108
PR merge metrics
No merged PRs in 30d

Description

I would love to see a one page summary, like the cheat sheet, of some of the basic and more advanced techniques to optimize Aurelia performance. Or a section, in the style of [Securing Your App](http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/securing-your-app/1).

There's a lot to learn in the documentation already, but it's spread out, and doesn't cover all common scenarios. There's more information on StackOverflow and in blogposts, but sometimes it's hard to judge how up-to-date and well-accepted such information is.

For example, I've been looking into what the best way is to expose computed information from my ViewModel. There's the [Binding: Computed Properties](http://aurelia.io/hub.html#/doc/article/aurelia/binding/latest/binding-computed-properties/1) page, but that only shows some simple examples. It doesn't show that `@computedFrom` can [handle paths](https://github.com/aurelia/binding/issues/149), or how to handle observation of arrays. I would also love to have a better grasp on when to use `@computedFrom`, when to use other techniques, and when dirty-checking is acceptable (though I understand this may be a controversial topic for discussion in the docs).

Then there's `ObserverLocator`. I've read blogposts recommending I have it injected into my ViewModels and use it to write my own observer code. But the API doc describes this class as "internal". Should I be using `BindingEngine.propertyObserver` and `BindingEngine.collectionObserver` in stead?

[Delegate vs. Trigger](http://aurelia.io/hub.html#/doc/article/aurelia/binding/latest/binding-delegate-vs-trigger) is also very helpful, and could be linked to.

And should I be worrying about such details beforehand? Or should I profile my app once I've got it working to look for bottlenecks? Searching for "Profiling" or "Profiler" on the Hub shows nothing. Do I profile it like any JS application? Or are there specific things to look for when using Aurelia?

In short, a page in the doc to give me an overview of considerations, with links to more in-depth information and discussion, would be a great help for more advanced applications.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing Binding: Computed Properties and Delegate vs. Trigger pages, then compare the ObserverLocator and BindingEngine API documentation. The finished work should be a consolidated performance guide covering computed properties, observation choices, profiling, and links to accepted deeper guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.