Open absar opened 9 months ago
Hi @absar 👋 Thanks for opening an issue!
It would be super helpful if you could provide a link to a minimal reproduction sample, thanks!
Hi @felangel here you go https://github.com/absar/mason_performance_issue_1257 Check the readme for additional comments and reproduction steps
Generating files from a list which is not a simple string rather a
List<Map<String, dynamic>>
takes exponentially greater time. For example{{#updateMethods}}{{{usecaseName.snakeCase()}}}.dart{{/updateMethods}}
takes over 30 minutes to generate 4 files on Windows 10 i7 processor with 16gb RAM, the process consumes only around 25% CPU and negligible disk and memory activity, however if you change the name extraction from triple{
to double e.g.{{#updateMethods}}{{usecaseName.snakeCase()}}.dart{{/updateMethods}}
then it generates in 5 seconds, however it only generates a single file by appending all names, with all the content meant for the 4 files. Using latest mason CLI, Flutter 3.16.9Sample input data: