Replies: 3 comments
-
I've managed to retrieve some data from the heapdump (using a combination of OQL to produce .csv file, and then perform queries on the csv). Looking at the
|
Beta Was this translation helpful? Give feedback.
-
I have tested it with Tapir project, which has 341 modules (primarily because of the sbt matrix expansion). Numbers are very big also: Startup: Reload: |
Beta Was this translation helpful? Give feedback.
-
https://github.com/sbt/sbt/blob/1.9.x/main/src/main/scala/sbt/internal/BuildStructure.scala contains |
Beta Was this translation helpful? Give feedback.
-
While investigating our SBT setup for our (rather large) monorepo (see #7158), we took several heap dumps of the sbt process.
SBT reports there are about 180.000 settings in use, across about 170 modules.
The heapdump reports huge numbers of objects of class
Scope
,ScopedKey
and other sbt.internal classes. Doing areload
and taking another heap dump will double the numbers on the firstreload
and then subsequent reloads flatten the count.It looks like there is a factor 12 to 30 between the reported number of settings and the number of these internal sbt objects. They take up a large part of the heap.
Do you know how to analyse these heap dumps to figure out to which setting each of these objects is related (so we may figure out why there are so many more ScopedKey objects than there are settings)?
Startup:
Scope: 1525089
ScopedKey: 1745366
FunctionOps: 1865504
Reload:
Scope: 3058127
ScopedKey: 3499871
FunctionOps: 3740000
Second reload:
Scope: 4591158
ScopedKey: 5254369
FunctionOps: 5614489
(edited to update numbers based on dump taken with
live
option)Beta Was this translation helpful? Give feedback.
All reactions