feat: adding workerManager parameter to createPolykeyAgent and createKeyManager#406
feat: adding workerManager parameter to createPolykeyAgent and createKeyManager#406tegefaulkes wants to merge 1 commit intostagingfrom
workerManager parameter to createPolykeyAgent and createKeyManager#406Conversation
This allows the relevant domains to access the worker pool for startup operations. Notably `KeyManager` uses this to do key generation. Related #399
|
We will need to consider now with the speed up, whether it is worth it to send it to the workers for encryption tasks. The latency spent can be alot more than the time required to just compute the data. To do this, we will need to put rules of thumb thresholds into the code as constants. That is if we the encrypted data is However that's not really entirely consistent due to platform differences. So it may be better to do a sort of JIT. Where we measure the time to compute and the time to sent to worker and back, and then compare, and adjust this threshold accordingly. We can test latency pretty easily regularly and we just need to compute things on the main thread or even in the worker thread and subtract the time... |
|
This is superseded by the work in #446. In there, the worker managers are still set dynamically but only used for certain things. Furthermore, they can set as part of the creation routines, so that bootstrapping can make use of it. This means, simply by changing up our order of bootstrap, this will be resolved. So I'm going to close this PR. |
Description
#399 was not actually a problem, just a race condition in the logs since the two outputs were on
stdoutandstderrat exactly the same time. I checked and there was no issue. However I did discover that theWorkerManagerwas only set after starting up polykey. So anything such asKeyManagerthat used it during startup never had it. I've made some modifications to fix this.workerManagercan be provided tocreatePolykeyAgentand propagated to the relevant domains. Ultimately theWorkerManageris started beforePolykeyAgentnow when doingpolykey agent start. This should fix the order of the logs too.Issues Fixed
Final checklist