Simple-storage limitations and startup performance
Skip to first unread message
Mar 17, 2016, 7:22:51 AM3/17/16
Reply to author
Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
This story begins with an addon I'm working on . Among other things,
the addon stores credentials (... used to and will again soon...) in the
simple-storage. I've had 2 problems being reported to me that seem related:
1) for some people (all on OSX from the reports I received), the addon
acts as if there was no credentials
2) the addon slows Firefox startup down significantly (to the point
where a user decided to uninstall the addon)
The problem 1) that I face is certainly related to a). This, in an of
itself, means that I won't be using simple-storage anymore as my users
face a problem I am unarmed to work against (they cannot even send me a
screenshot of the browser console).
Problem 2) may be related to b). This line of course is super
easy/natural to write and has consequences it probably shouln't have. It
would be possible to rewrite simple-storage as a Proxy  and wait to
do the blocking I/O only on first property access (and lazily write only
when a property is changed instead of forcing it every 5 minutes).
However, I also realize that problem 2) may be also related to the
CommonJS loader which, I imagine is doing sequential blocking I/O which
isn't fantastic at startup.
Would you have advice on how to measure the impact of the addon on
startup perf? and advice on how to improve it if loading CommonJS module
indeed does have an impact on performance?