Project

General

Profile

Actions

Bug #16505

closed

Bug #16382: Improve performance of policy generation writer

Change ZIO runtime ergonomics

Added by François ARMAND almost 5 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Performance and scalability
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

Description

An other little PR from the big parent one:

We run all our effects on ZIO blocking thread pool, which is a thread pool with unlimited thread number but each time a thread is needed and none available, a new one is created, and unused thread are quickly destroyed. This is not optimal for our use case where almost all of our effects are extremelly short (ie: more writting a file / eval JS than wait for a request to a remote server).
This is the correct way to run effect, see: https://github.com/zio/zio/issues/1275 but it is coslty.
We can make things a bit better while we wait for a smarter runtime by changing the blocking thread pool ergonomics:

- make thread live longer when unused,
- make the default pool size bigger,
- make zio runtime yield less often.

Actions

Also available in: Atom PDF