Compilation Takes a Long Time When Using Data Mapper in the Project
Current Limitation
The DataMapper Mediator is very effective and often clearer than the PayloadFactory in some use cases. However, it significantly increases the compilation time in VS Code Extensions. When I click "Build and Run," Maven starts by removing all files in the "./target" directory, downloading Node.js and npm, and running "npm install" before packaging the ".car" archive. This process can take more than 10 minutes. After the initial compilation, subsequent compilations also take a long time because Node.js, npm, and the node_modules directory, which are downloaded during "npm install," are all removed as they reside in the "./target" folder. If I use DataMapper, every time I compile the project, I have to wait more than 10 minutes for downloading Node.js, npm, and running "npm install." This is quite frustrating.
Suggested Improvement
- Change the location of Node.js and node_modules.
- Allow users to configure the location of Node.js and node_modules.
- Stop removing Node.js and node_modules from the ./target folder.
Version
4.3.0
Hi! I would like to work on this issue.
Hello @a0529gox, Thank you for raising this issue. I fully understand the problem and I'm confident I can provide a solid solution. I’ll also make sure to cover any related edge cases to ensure it meets our needs. I’d really appreciate it if you could assign this to me.
Thank you!
Hi @a0529gox , Thanks for pointing out the issue. I am interested in solving it, so kindly assign it to me.
Hello, I would like to work on this issue.
Hi @a0529gox / @chanikag,
I’ve reviewed this issue and the challenges with DataMapper compilation. I’d be happy to contribute towards optimizing the build process—for example, by persisting Node.js and node_modules outside the ./target directory or providing a configurable path to avoid repeated downloads.
If this issue is still open for contribution, could you please assign it to me?
Thank you!