On 02/23/2017 11:10 AM, Masayuki Nakano wrote:
Do you have any ideas of the cases we should use Add*VarCache?
For example, it's bad if using Get* when:
* every painting
possibly
* every mousemove
probably
* every user input except mousemove
well, touchmove is happening a lot too, and possibly wheel, so maybe cache
should be used.
Writing a microbenchmark and profiling a bit shouldn't take more than couple of
minutes and if the
Get* shows up in the profiles, perhaps worth to convert to Add*VarCache
* every focus move
happens quite rarely, so maybe not needed
* every DOM change
Definitely use cache
* every page load
This happens rarely, so probably doesn't matter
etc.
I wonder, if everybody uses Add*VarCache, doesn't it cause another performance
problem when a pref is changed?
On 2017/02/22 20:18, smaug wrote:
Hi,
Preferences::GetBool is a slow hashtable lookup and has been showing up in
performance profiles in many places.
Please use Preferences::AddBoolVarCache. Same with other pref types.
Or if the pref needs to be read just once, store the value in some static
variable or so.
-Olli
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform