Jooq / Java 64K persistent pool

Quote from the Jooq manual :

Disabling the generation of the above files may be required for large circuits that exceed the permissible constants in the class constant pool (64k) or, whose static initializer would exceed 64k byte code

I understand this problem, but how it can be measured or planned. Does anyone have a good estimate of how many tables with the number of columns per table with a reasonable average name length? I really appreciate the fact that this is a question like “how long is a string”, but any formula of reasonable accuracy or a well-rated score is appreciated.

+4
source share
1 answer

JOOQ // . , , , . , . . :

GETSTATIC (reference)
PUTSTATIC (reference)

- , , 6 . () return, . 64 - 1 6 , 10.922 , .. (65536 - 1) / 6 = 10.922 , .

65536 . , , . , .

. . . , , get , 2 . set get , . , . 2 + 1 + 1 + 2 = 6 . , . , , ​​ . , , . 12 , , (65536 - 12) / 6 = 10.920.

, 10.920 , - , .

, - , . , . , - , 10.000 .

+7

Source: https://habr.com/ru/post/1661163/


All Articles