Open
1 of 1 issue completedDescription
The benchmark I'm adding in #3802 shows the problem pretty clearly,
json_serializable | |||
---|---|---|---|
libraries | clean/ms | no changes/ms | incremental/ms |
1 | 21573 | 2840 | 4278 |
100 | 23040 | 2974 | 6327 |
250 | 28098 | 3285 | 12578 |
500 | 42940 | 4288 | 35061 |
750 | 69483 | 6561 | 67670 |
1000 | 115941 | 9178 | 119308 |
notice the incremental build time for 500 libraries and 1000 libraries: it increases from 35s to 119s, an increase of x3.4. For double the number of libraries the time increase should be x2 :)
The benchmark also runs for built_value
, freezed
and mockito
, numbers on the PR, the story is pretty similar, except:
built_value
andjson_serializable
are about 2x as slow asfreezed
on the big build, it turns out this is purely because they use shared parts, filed Faster shared parts #3803 for that sub-problemmockito
is about 2x as fast asfreezed
, I believe that is because mockito adds a part file to the test where it does not become a dep of all the other generators; converselybuilt_value
,json_serializable
andfreezed
all add part files in the app code, doubling the number of deps of all the generators
Apart from these multipliers the numbers are very similar, I think it does not matter much what the generators are actually doing.