[Solved] Slow build time (inc HMR)

Hi All,

I’m just posting this just in case it helps anyone else out, as I managed to ‘fix’ the issue.

My issue: Slow build times in the Dev environment.

The problem was really slowing my development as I had gotten really used to the hot module replacement feature where I would iterate on code, save and see the results in the browser pretty much immediately.

I’m using a Mac and React for my project.

For no reason I could think of, one day build times increased dramatically. I put up with it for a while, but it was getting more and more frustrating, so I decided to do something about it.

I looked through my code, made sure all my 3rd party code was up to date, restarted my machine, even did a meteor reset. None of which worked.

I then saw the Environment variable you can set that will give you a verbose output when meteor is building. So I gave that a go to see what was causing the issue.

Basically run: METEOR_PROFILE=1 meteor --settings settings.json
(no need for the settings bit, it’s just that I have some dev env. settings).

On initial build, I get a load of info.
On file change, I get another (smaller) dump of info.

Here’s the funny thing though - my builds have sped up again!!
I quit meteor and re-run without the profiler on, and build speeds are still fast.

So, something about running with the profiler on has ‘cleared out’ whatever was causing my slow builds.

Like I said, I don’t really know why they started in the first place as I had only changed a few lines of my code and not installed or updated anything. I had tried all sorts before trying the profiler too.

I’m curious to hear if other people have the same problem and this little ‘trick’ cured it for them too…

Hello,
For about 10 days my builds in development are longer (nothing has really changed in my mac or in my app). I try your trick but this had no effect for me…

That’s a shame. Good luck with finding your issue!

Hi, have you run with METEOR_PROFILE=1 to understand where the time has increased?

METEOR_PROFILE is not going to make any difference in next builds, it just enables more outputs.

This was just a coincidence.

Did you identify in each step your build were running slower?

I figured it was a coincidence, but thought I would mention it just in case.

The output let me see which bits of the build were the slowest, but because I didn’t have an output from a slow build and a fast build to compare, I’ve no idea if there was some specific part of the build that slowed down during the time I was having problems.

What I might do is do a build with the logging enabled and save it to a file somewhere, so if I get the problem again I can create a new log and compare it to the older one to see if a specific thing slowed.

Rob.

Hello Filipe,
I start my app with METEOR_PROFILE=1. Then I add a dummy space character in one of my file to trigger the rebuild and this is the output :

I took nearly 40 seconds.

| (#4) Profiling: ProjectContext prepareProjectForBuild
| 
| ProjectContext prepareProjectForBuild...........................844 ms (1)
| ├─ _initializeCatalog...........................................113 ms (1)
| │  └─ LocalCatalog#initialize...................................112 ms (1)
| │     ├─ addPatternsToList                                        1 ms (2)
| │     ├─ LocalCatalog#_computeEffectiveLocalPackages              1 ms (1)
| │     └─ LocalCatalog#_loadLocalPackages........................110 ms (1)
| │        ├─ PackageSource#initFromPackageDir for cfs-http-methods-fixed 4 ms (1)
| │        ├─ PackageSource#initFromPackageDir for meteor-tabular-fixed 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-activities 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-attachments 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-bom    1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-categories-csv-export 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-comments 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-core   4 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-cron   1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-custom-managed-service.2 ms (1)
| │        │  └─ sqlite query                                       1 ms (2)
| │        ├─ PackageSource#initFromPackageDir for rationalk-erp   10 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-events 2 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-fields.2 ms (1)
| │        │  └─ sqlite query                                       1 ms (2)
| │        ├─ PackageSource#initFromPackageDir for rationalk-license.1 ms (1)
| │        │  └─ sqlite query                                       1 ms (2)
| │        ├─ PackageSource#initFromPackageDir for rationalk-project-dashboard 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-project-overview 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-project-pictures 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-project-summary 1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-project.3 ms (1)
| │        │  └─ runJavaScript package.js                           1 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-tags   2 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-tasks  2 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-tree-view 2 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-upload-logo 2 ms (1)
| │        ├─ PackageSource#initFromPackageDir for rationalk-users..3 ms (1)
| │        │  └─ sqlite query                                       2 ms (2)
| │        ├─ PackageSource#initFromPackageDir for twbs-bootstrap-modified.2 ms (1)
| │        │  └─ sqlite query                                       1 ms (2)
| │        └─ other LocalCatalog#_loadLocalPackages                19 ms
| ├─ _resolveConstraints...........................................18 ms (1)
| │  ├─ Select Package Versions.....................................8 ms (1)
| │  │  └─ new CS.Input                                             8 ms (1)
| │  ├─ files.writeFileAtomically                                   1 ms (1)
| │  └─ other _resolveConstraints                                   8 ms
| ├─ _downloadMissingPackages......................................41 ms (1)
| │  ├─ Isopack.readMetadataFromDirectory..........................31 ms (135)
| │  │  ├─ files.stat                                               1 ms (135)
| │  │  ├─ files.readFile                                          28 ms (135)
| │  │  └─ other Isopack.readMetadataFromDirectory                  2 ms
| │  └─ other _downloadMissingPackages                             10 ms
| └─ _buildLocalPackages..........................................672 ms (1)
|    ├─ _ensurePackageLoaded(accounts-base)                         2 ms (1)
|    ├─ _ensurePackageLoaded(ajduke:bootstrap-tagsinput)............2 ms (1)
|    │  └─ _ensurePackageLoaded(twbs:bootstrap).....................2 ms (1)
|    │     └─ IsopackCache Build local isopack                      1 ms (1)
|    ├─ _ensurePackageLoaded(aldeed:tabular)........................3 ms (1)
|    │  ├─ IsopackCache Build local isopack                         1 ms (1)
|    │  └─ other _ensurePackageLoaded(aldeed:tabular)               1 ms
|    ├─ _ensurePackageLoaded(rationalk:activities)................612 ms (1)
|    │  ├─ _ensurePackageLoaded(rationalk:core).....................7 ms (1)
|    │  │  └─ IsopackCache Build local isopack......................6 ms (1)
|    │  │     ├─ Isopack#getMergedWatchSet                          1 ms (2)
|    │  │     ├─ watch.isUpToDate...................................4 ms (1)
|    │  │     │  ├─ files.readdirWithTypes                          3 ms (20)
|    │  │     │  └─ other watch.isUpToDate                          1 ms
|    │  │     └─ other IsopackCache Build local isopack             1 ms
|    │  ├─ _ensurePackageLoaded(rationalk:fields)...................3 ms (1)
|    │  │  ├─ _ensurePackageLoaded(rationalk:settings)..............1 ms (1)
|    │  │  │  └─ IsopackCache Build local isopack                   1 ms (1)
|    │  │  └─ IsopackCache Build local isopack                      1 ms (1)
|    │  ├─ _ensurePackageLoaded(rationalk:erp)....................601 ms (1)
|    │  │  ├─ _ensurePackageLoaded(rationalk:contacts)..............2 ms (1)
|    │  │  │  └─ IsopackCache Build local isopack                   2 ms (1)
|    │  │  ├─ _ensurePackageLoaded(rationalk:meeting-minutes)       1 ms (1)
|    │  │  └─ IsopackCache Build local isopack....................596 ms (1)
|    │  │     ├─ Isopack#getMergedWatchSet                          2 ms (2)
|    │  │     ├─ files.readFile                                     1 ms (1)
|    │  │     ├─ compiler.compile(rationalk:erp)..................231 ms (1)
|    │  │     │  └─ compileUnibuild (rationalk:erp)...............231 ms (3)
|    │  │     │     ├─ Isopack#getUnibuildAtArch                    2 ms (252)
|    │  │     │     ├─ PackageSource#_findSources for os...........29 ms (1)
|    │  │     │     │  ├─ _realpath                                 3 ms (69)
|    │  │     │     │  ├─ files.stat                                9 ms (69)
|    │  │     │     │  ├─ safeWatcher.watch                         2 ms (138)
|    │  │     │     │  ├─ files.readdirWithTypes                    7 ms (138)
|    │  │     │     │  └─ other PackageSource#_findSources for os   8 ms
|    │  │     │     ├─ optimistic readFile........................131 ms (838)
|    │  │     │     │  ├─ files.readFile                          130 ms (838)
|    │  │     │     │  └─ other optimistic readFile                 2 ms
|    │  │     │     ├─ safeWatcher.watch                            2 ms (839)
|    │  │     │     ├─ PackageSource#_findSources for web.browser..12 ms (1)
|    │  │     │     │  ├─ _realpath                                 1 ms (69)
|    │  │     │     │  ├─ files.readdirWithTypes                    6 ms (138)
|    │  │     │     │  └─ other PackageSource#_findSources for web.browser 5 ms
|    │  │     │     ├─ PackageSource#_findSources for web.browser.legacy.9 ms (1)
|    │  │     │     │  ├─ files.readdirWithTypes                    5 ms (138)
|    │  │     │     │  └─ other PackageSource#_findSources for web.browser.legacy 3 ms
|    │  │     │     └─ other compileUnibuild (rationalk:erp)       46 ms
|    │  │     ├─ compiler.lint(rationalk:erp)                       2 ms (1)
|    │  │     ├─ Isopack#saveToPath...............................352 ms (1)
|    │  │     │  ├─ files.stat                                     25 ms (624)
|    │  │     │  ├─ files.mkdir                                    12 ms (208)
|    │  │     │  ├─ Builder#write.................................269 ms (2183)
|    │  │     │  │  ├─ Builder#_ensureDirectory                     6 ms (2183)
|    │  │     │  │  ├─ sha1                                        18 ms (2183)
|    │  │     │  │  ├─ files.writeFile                            227 ms (2183)
|    │  │     │  │  └─ other Builder#write                         18 ms
|    │  │     │  └─ other Isopack#saveToPath                       43 ms
|    │  │     └─ other IsopackCache Build local isopack             6 ms
|    │  └─ IsopackCache Build local isopack                         1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:category-csv-export)         1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:comments)                    1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:docs-rights).................2 ms (1)
|    │  └─ _ensurePackageLoaded(rationalk:project)..................1 ms (1)
|    │     └─ IsopackCache Build local isopack                      1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:gantt).......................2 ms (1)
|    │  ├─ _ensurePackageLoaded(rationalk:tasks)                    1 ms (1)
|    │  └─ IsopackCache Build local isopack.........................1 ms (1)
|    │     └─ watch.isUpToDate                                      1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:kanban)......................1 ms (1)
|    │  └─ IsopackCache Build local isopack                         1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:prices-import)...............1 ms (1)
|    │  └─ IsopackCache Build local isopack                         1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:production-orders)...........1 ms (1)
|    │  └─ IsopackCache Build local isopack.........................1 ms (1)
|    │     └─ watch.isUpToDate                                      1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:project-accounting)..........2 ms (1)
|    │  └─ IsopackCache Build local isopack.........................1 ms (1)
|    │     └─ watch.isUpToDate                                      1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:project-import)..............1 ms (1)
|    │  └─ IsopackCache Build local isopack                         1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:project-pictures)............1 ms (1)
|    │  └─ IsopackCache Build local isopack.........................1 ms (1)
|    │     └─ watch.isUpToDate                                      1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:project-risks)               1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:tasks-import)................1 ms (1)
|    │  └─ IsopackCache Build local isopack                         1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:tree-view)...................2 ms (1)
|    │  └─ IsopackCache Build local isopack.........................2 ms (1)
|    │     └─ watch.isUpToDate                                      1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:user-signatures)             1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:users).......................2 ms (1)
|    │  └─ IsopackCache Build local isopack.........................2 ms (1)
|    │     └─ watch.isUpToDate                                      1 ms (1)
|    ├─ _ensurePackageLoaded(rationalk:users-roles-import)..........2 ms (1)
|    │  └─ IsopackCache Build local isopack                         1 ms (1)
|    └─ other _buildLocalPackages                                   4 ms
| 
| Top leaves:
| files.writeFile............................................228 ms (2189)
| files.readFile.............................................159 ms (975)
| 
| (#4) Total: 844 ms (ProjectContext prepareProjectForBuild)
| 
| (#5) Profiling: Rebuild App
| 
| files.stat                                                        0 ms (1)
| files.unwatchFile                                                 1 ms (184)
| Rebuild App..................................................45,077 ms (1)
| └─ bundler.bundle............................................45,077 ms (1)
|    ├─ initFromAppDir                                              1 ms (1)
|    ├─ compiler.compile(the app)..............................42,598 ms (1)
|    │  └─ compileUnibuild (the app)...........................42,598 ms (3)
|    │     ├─ Isopack#getUnibuildAtArch                             2 ms (516)
|    │     ├─ PackageSource#_findSources for os                     4 ms (1)
|    │     ├─ files.readdirWithTypes                               13 ms (248)
|    │     ├─ _realpath.............................................3 ms (245)
|    │     │  ├─ files.lstat                                        2 ms (245)
|    │     │  └─ other _realpath                                    1 ms
|    │     ├─ legacy handler (.i18n.json)......................42,192 ms (15)
|    │     │  ├─ sha1                                               2 ms (15)
|    │     │  └─ other legacy handler (.i18n.json)             42,191 ms
|    │     ├─ PackageSource#_findSources for web.browser            3 ms (1)
|    │     └─ other compileUnibuild (the app)                     379 ms
|    ├─ compiler.lint(the app)                                      2 ms (1)
|    ├─ bundler.bundle..makeClientTarget........................2,290 ms (1)
|    │  └─ Target#make..........................................2,290 ms (1)
|    │     ├─ Isopack#getUnibuildAtArch                            14 ms (13812)
|    │     ├─ Target#_runCompilerPlugins..........................125 ms (1)
|    │     │  ├─ Isopack#getUnibuildAtArch                         22 ms (25626)
|    │     │  ├─ plugin ecmascript                                 13 ms (1)
|    │     │  ├─ plugin meteor                                      2 ms (1)
|    │     │  ├─ plugin templating-compiler........................32 ms (1)
|    │     │  │  ├─ files.readFile                                  2 ms (57)
|    │     │  │  └─ other plugin templating-compiler               30 ms
|    │     │  ├─ plugin coffeescript                                2 ms (1)
|    │     │  ├─ plugin zodern:meteor-package-versions              1 ms (1)
|    │     │  └─ other Target#_runCompilerPlugins                  52 ms
|    │     ├─ Target#_emitResources.............................1,988 ms (1)
|    │     │  ├─ PackageSourceBatch.computeJsOutputFilesMap.......493 ms (1)
|    │     │  │  ├─ sha1                                            3 ms (1247)
|    │     │  │  ├─ ImportScanner#getAbsModuleId                   24 ms (5042)
|    │     │  │  ├─ ImportScanner#realPath                         41 ms (3796)
|    │     │  │  ├─ ImportScanner#scanImports for modules           2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for ecmascript-runtime-client 4 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for random            3 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for ddp-client        1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for minimongo         2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for blaze             2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for ostrio:files      1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for aldeed:tabular....3 ms (1)
|    │     │  │  │  └─ ImportScanner#readFile                       1 ms (2)
|    │     │  │  ├─ ImportScanner#scanImports for matb33:collection-hooks 1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:core...27 ms (1)
|    │     │  │  │  ├─ Babel.compile                                6 ms (149)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers..6 ms (287)
|    │     │  │  │  │  ├─ sha1                                      3 ms (574)
|    │     │  │  │  │  └─ other ImportScanner#findImportedModuleIdentifiers 3 ms
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:core 14 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:settings 3 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:fields.11 ms (1)
|    │     │  │  │  ├─ Babel.compile                                3 ms (63)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers..3 ms (118)
|    │     │  │  │  │  ├─ sha1                                      1 ms (236)
|    │     │  │  │  │  └─ other ImportScanner#findImportedModuleIdentifiers 1 ms
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:fields 5 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:meeting-minutes.4 ms (1)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers  1 ms (41)
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:meeting-minutes 2 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:rh-vacation-requests 2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:erp....95 ms (1)
|    │     │  │  │  ├─ Babel.compile                               47 ms (357)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers.15 ms (663)
|    │     │  │  │  │  ├─ sha1                                      7 ms (1326)
|    │     │  │  │  │  └─ other ImportScanner#findImportedModuleIdentifiers 9 ms
|    │     │  │  │  ├─ ImportScanner#resolve                        2 ms (215)
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:erp 31 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:custom-managed-service.11 ms (1)
|    │     │  │  │  ├─ Babel.compile                                2 ms (56)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers  4 ms (109)
|    │     │  │  │  ├─ ImportScanner#resolve                        1 ms (171)
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:custom-managed-service 4 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:custom-reactolab 2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:kpi     1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:inventory 1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:activities.11 ms (1)
|    │     │  │  │  ├─ Babel.compile                                2 ms (59)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers..4 ms (115)
|    │     │  │  │  │  ├─ sha1                                      1 ms (230)
|    │     │  │  │  │  └─ other ImportScanner#findImportedModuleIdentifiers 2 ms
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:activities 5 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:production-orders 3 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:project.12 ms (1)
|    │     │  │  │  ├─ Babel.compile                                5 ms (72)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers..3 ms (142)
|    │     │  │  │  │  ├─ sha1                                      1 ms (284)
|    │     │  │  │  │  └─ other ImportScanner#findImportedModuleIdentifiers 1 ms
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:project 4 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:project-calendars 3 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:project-resources 2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:project-dashboard.7 ms (1)
|    │     │  │  │  ├─ Babel.compile                                2 ms (50)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers..2 ms (102)
|    │     │  │  │  │  └─ sha1                                      1 ms (204)
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:project-dashboard 3 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:categories 2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:receipts 2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:project-accounting 3 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:project-risks 1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:tasks..10 ms (1)
|    │     │  │  │  ├─ Babel.compile                                2 ms (61)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers..3 ms (121)
|    │     │  │  │  │  ├─ sha1                                      1 ms (242)
|    │     │  │  │  │  └─ other ImportScanner#findImportedModuleIdentifiers 1 ms
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:tasks 5 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:gantt   2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:kanban..4 ms (1)
|    │     │  │  │  ├─ Babel.compile                                1 ms (34)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers  1 ms (66)
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:kanban 2 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:tags    4 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:attachments.10 ms (1)
|    │     │  │  │  ├─ Babel.compile                                2 ms (53)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers  2 ms (103)
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:attachments 6 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:users...5 ms (1)
|    │     │  │  │  ├─ Babel.compile                                1 ms (40)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers  1 ms (74)
|    │     │  │  │  └─ other ImportScanner#scanImports for rationalk:users 2 ms
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:comments 2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:journal 1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:bpm     1 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for rationalk:ext     3 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for montiapm:agent    2 ms (1)
|    │     │  │  ├─ ImportScanner#scanImports for the app...........3 ms (1)
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers  1 ms (8)
|    │     │  │  │  └─ other ImportScanner#scanImports for the app  2 ms
|    │     │  │  ├─ ImportScanner#scanMissingModules for the app...67 ms (2)
|    │     │  │  │  ├─ ImportScanner#resolve.......................12 ms (1013)
|    │     │  │  │  │  ├─ ImportScanner#addPkgJsonToOutput          6 ms (468)
|    │     │  │  │  │  └─ other ImportScanner#resolve               6 ms
|    │     │  │  │  ├─ ImportScanner#getAbsModuleId                 2 ms (437)
|    │     │  │  │  ├─ ImportScanner#realPath                       7 ms (437)
|    │     │  │  │  ├─ ImportScanner#readFile                      19 ms (438)
|    │     │  │  │  ├─ DefaultHandlers.js...........................3 ms (430)
|    │     │  │  │  │  ├─ reifyCompileWithCache                     1 ms (430)
|    │     │  │  │  │  └─ other DefaultHandlers.js                  2 ms
|    │     │  │  │  ├─ ImportScanner#findImportedModuleIdentifiers  1 ms (444)
|    │     │  │  │  └─ other ImportScanner#scanMissingModules for the app 24 ms
|    │     │  │  ├─ ImportScanner#scanMissingModules for socket-stream-client 2 ms (1)
|    │     │  │  ├─ PackageSourceBatch._watchOutputFiles            3 ms (1)
|    │     │  │  └─ other PackageSourceBatch.computeJsOutputFilesMap 58 ms
|    │     │  ├─ PackageSourceBatch#getResources................1,301 ms (192)
|    │     │  │  ├─ PackageSourceBatch#_linkJS..................1,300 ms (192)
|    │     │  │  │  ├─ sha1                                         9 ms (572)
|    │     │  │  │  ├─ linker.fullLink..........................1,247 ms (1)
|    │     │  │  │  │  ├─ linker Module#getPrelinkedFiles.........527 ms (1)
|    │     │  │  │  │  │  ├─ linker File#getPrelinkedOutput       251 ms (715)
|    │     │  │  │  │  │  ├─ getPrelinkedFiles toStringWithSourceMap 228 ms (1)
|    │     │  │  │  │  │  └─ other linker Module#getPrelinkedFiles 47 ms
|    │     │  │  │  │  ├─ linker Module#computeAssignedVariables..713 ms (1)
|    │     │  │  │  │  │  ├─ linker File#computeAssignedVariables 708 ms (715)
|    │     │  │  │  │  │  └─ other linker Module#computeAssignedVariables 5 ms
|    │     │  │  │  │  └─ other linker.fullLink                     7 ms
|    │     │  │  │  ├─ files.rm_recursive                           8 ms (1)
|    │     │  │  │  ├─ files.writeFileAtomically...................19 ms (1)
|    │     │  │  │  │  └─ files.writeFile                          18 ms (1)
|    │     │  │  │  └─ other PackageSourceBatch#_linkJS            18 ms
|    │     │  │  └─ other PackageSourceBatch#getResources           1 ms
|    │     │  ├─ sha512                                            19 ms (1157)
|    │     │  ├─ sha1                                               3 ms (1213)
|    │     │  └─ other Target#_emitResources                      172 ms
|    │     ├─ Target#minifyJs......................................71 ms (1)
|    │     │  ├─ sha512                                            33 ms (193)
|    │     │  └─ other Target#minifyJs                             37 ms
|    │     ├─ ClientTarget#minifyCss................................2 ms (1)
|    │     │  └─ minifyCssFiles                                     2 ms (1)
|    │     ├─ sha512                                               50 ms (1350)
|    │     ├─ sha1                                                  3 ms (1350)
|    │     └─ other Target#make                                    37 ms
|    ├─ bundler writeTargetToPath.................................180 ms (1)
|    │  └─ ClientTarget#write.....................................178 ms (1)
|    │     ├─ sha1                                                  1 ms (638)
|    │     ├─ bundler writeFile....................................10 ms (1988)
|    │     │  ├─ Builder#_ensureDirectory                           6 ms (1988)
|    │     │  └─ other bundler writeFile                            4 ms
|    │     ├─ Builder#write........................................32 ms (1270)
|    │     │  ├─ Builder#_ensureDirectory                           5 ms (1270)
|    │     │  ├─ sha1                                              20 ms (1270)
|    │     │  ├─ files.writeFile                                    1 ms (1)
|    │     │  └─ other Builder#write                                5 ms
|    │     └─ other ClientTarget#write                            134 ms
|    └─ other bundler.bundle                                        5 ms
| 
| Top leaves:
| other legacy handler (.i18n.json).......................42,191 ms (15)
| linker File#computeAssignedVariables.......................708 ms (715)
| other compileUnibuild (the app)............................379 ms (3)
| linker File#getPrelinkedOutput.............................251 ms (715)
| getPrelinkedFiles toStringWithSourceMap....................228 ms (1)
| other Target#_emitResources................................172 ms (1)
| other ClientTarget#write...................................134 ms (1)
| sha512.....................................................103 ms (2749)
| 
| (#5) Total: 45,078 ms (Rebuild App)
| 
=> Client modified -- refreshing
=> Finished delayed build of web.browser.legacy in 1384ms


I see some strange 42 seconds with .i18n.json files … this can be a hint
(and I remember I add a new language to the app around 10 days ago when it started to be slower)

Is this normal to have this i18n translation strings impacting my build ? Or they should be loaded by the tap:18n package later by the app ?

I believe you are discussing this issue in more detail here.

1 Like