[OpenJDK 2D-Dev] RFR: 8261549: Adjust memory size in MTLTexurePool.m

Phil Race prr at openjdk.java.net
Sat Jun 5 23:48:59 UTC 2021


On Tue, 1 Jun 2021 09:20:07 GMT, Alexey Ushakov <avu at openjdk.org> wrote:

> Used MTLDevice recommendedMaxWorkingSetSize property for optimal size of the texture pool

src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLTexurePool.m line 328:

> 326:     if (_maxPoolMemory < MAX_POOL_MEMORY) {
> 327:         _maxPoolMemory = MAX_POOL_MEMORY;
> 328:     }

The Apple 5K retina is 5120‑by‑2880 pixels

So we start off with a number that is too small
#define SCREEN_MEMORY_SIZE_4K (4096*2160*4) //~33,7 mb
and then divide it by 2
#define MAX_POOL_MEMORY SCREEN_MEMORY_SIZE_4K/2

and I have no idea what a typical size is for 
self.device.recommendedMaxWorkingSetSize
which we are also dividing by 2.

So I have no idea what the logic is behind all these numbers.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4279


More information about the 2d-dev mailing list