Bug 1610390 Comment 28 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Magnus Melin [:mkmelin] from comment #26)
> Yeah I'm asking how many milliseconds does a no-op cost?

With pref=false, zero ms (as expected, very quick for checking the pref value, only).

With pref enabled, I don't think we don't have to pay any price either.

Although with pref enabled, I measure 6 ms for this code (Intel i7, 2.8 ghz), it's because it triggers NSS library init at an earlier time. This time will be saved later on.

I'll attach the patch I used for measuring.
With pref disabled, NSS init is triggered in nsMsgAccountManager::Init calling net_EnsurePSMInit.

With pref enabled:
time for startup login: 0
time for net_EnsurePSMInit: 14

With pref disabled:
time for startup login: 6
time for net_EnsurePSMInit: 1
(In reply to Magnus Melin [:mkmelin] from comment #26)
> Yeah I'm asking how many milliseconds does a no-op cost?

With pref=false, zero ms (as expected, very quick for checking the pref value, only).

With pref enabled, I don't think we don't have to pay any price either.

Although with pref enabled, I measure 6 ms for this code (Intel i7, 2.8 ghz), it's because it triggers NSS library init at an earlier time. This time will be saved later on.

I'll attach the patch I used for measuring.
With pref disabled, NSS init is triggered in nsMsgAccountManager::Init calling net_EnsurePSMInit.

With pref disabled:
time for startup login: 0
time for net_EnsurePSMInit: 14

With pref enabled:
time for startup login: 6
time for net_EnsurePSMInit: 1

edit: fixed labels for timing results

Back to Bug 1610390 Comment 28