micro-integrator icon indicating copy to clipboard operation
micro-integrator copied to clipboard

Compilation Takes a Long Time When Using Data Mapper in the Project

Open a0529gox opened this issue 10 months ago • 5 comments

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

  1. Change the location of Node.js and node_modules.
  2. Allow users to configure the location of Node.js and node_modules.
  3. Stop removing Node.js and node_modules from the ./target folder.

Version

4.3.0

a0529gox avatar Feb 14 '25 07:02 a0529gox

Hi! I would like to work on this issue.

TharakaUJ avatar Sep 26 '25 16:09 TharakaUJ

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!

Sanjaya-Samudra avatar Sep 26 '25 17:09 Sanjaya-Samudra

Hi @a0529gox , Thanks for pointing out the issue. I am interested in solving it, so kindly assign it to me.

myleshmulecraft avatar Sep 30 '25 10:09 myleshmulecraft

Hello, I would like to work on this issue.

GayaniGunasekara avatar Sep 30 '25 16:09 GayaniGunasekara

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!

adityagupta0251 avatar Sep 30 '25 17:09 adityagupta0251