Project

General

Profile

Feature #23552

Updated by Kefu Chai about 6 years ago

please see attached flamegraph, the 0.67% CPU cycle is used by PK11_CreateContextBySymKey(), if we cache the PK11Context returned by this function, we can save the cost. but please note, the PK11Context is not thread safe: we cannot share the same PK11Context instance across multiple threads. thread. So, if we decide to cache it, we will need to move it to the upper level, for example, the messenger's Connection class, that would cover both simple and async messengers. so there will be only a single thread at a give time accessing it.

Back