canmove, Confirmed users
1,448
edits
mNo edit summary  | 
				 (→Summary:  Promises are fast)  | 
				||
| Line 26: | Line 26: | ||
* See if we can get querySelector faster (stas/axel)  | * See if we can get querySelector faster (stas/axel)  | ||
* See if we can understand if we pay too much for Promises (stas/axel)  | * See if we can understand if we pay too much for Promises (stas/axel)  | ||
===Promises are fast if they're few===  | |||
Staś talked to Till about Promises.  Till said Promises are generally fast unless 1) you create a lot of them and 2) javascript.options.asyncstack is true (which it is in Nightly).  In our case, we're creating under 10 Promises total and there shouldn't be any perf impact.  Till advised against that the formatEntity scenario (where each translation has its own Promise) warning about the perf hit of creating a lot of Promises.  This is in line with what we saw in our testing.  | |||
javascript.options.asyncstack is only true on Nightly right now but Till wants it off everywhere.  If I can prove that it affects the performance of the formatEntity scenario, that would help Till's cause.  | |||
I showed him the profile and he noticed that our code actually uses Promise.jsm and not his implementation of the DOM Promise.  It's likely that another script in browser.xul imports Promise.jsm and overrides the DOM Promise.  | |||
==Previous Research==  | ==Previous Research==  | ||