mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-10 18:23:21 +08:00
9e14f2207f
This method is called for every contact on a thread in the thread list, so I figured we should see if one version was faster. I ran this test code: ``` d = Date.now(); for(var ii = 0; ii < 10000; ii ++){ $n.AccountStore.accountForEmail("ben.gotow@gmail.com") }; console.log(Date.now() - d); ``` The other approach which calls meUsingAlias takes `3784ms`, and this version which uses the alias contacts cached in aliases() only takes `264ms`. Confirmed that the tests still pass. |
||
---|---|---|
.. | ||
category-spec.coffee | ||
contact-spec.coffee | ||
event-spec.coffee | ||
file-spec.coffee | ||
message-spec.coffee | ||
model-spec.coffee | ||
mutable-query-result-set-spec.coffee | ||
query-range-spec.coffee | ||
query-spec.coffee | ||
query-subscription-pool-spec.coffee | ||
query-subscription-spec.coffee | ||
thread-spec.coffee |