Skip to content

Scalable builds #3811

Open
1 of 1 issue completed
Open
1 of 1 issue completed
@davidmorgan

Description

@davidmorgan

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 and json_serializable are about 2x as slow as freezed on the big build, it turns out this is purely because they use shared parts, filed Faster shared parts #3803 for that sub-problem
  • mockito is about 2x as fast as freezed, 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; conversely built_value, json_serializable and freezed 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.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1A high priority bug; for example, a single project is unusable or has many test failurestype-enhancementA request for a change that isn't a bugtype-performance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions