On Wed, Feb 22, 2017 at 01:18:33PM +0200, smaug wrote:
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.

And in JS code, you can use XPCOMUtils.defineLazyPreferenceGetter for the same reasons, and the same effect.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to