DEV Community

Dylan Watson
Dylan Watson

Posted on • Updated on

Java/Angular Build Speed Improvements

I've been inspired to fix our build times after watching:

I'll be updating this as I investigate different techniques this week.

Here are a list of improvements and the effect they had on build times.

Java & Spring Boot

Spring lazy init

This made the build twice as slow.. and broke the swagger tests as some of the endpoints didn't get instantiated.


Reduce all logging to only log on WARN

Have a single "test" profile

The more profiles you have in tests, the more the spring DI ApplicationContext cache has to be reset. This can have a massive speed impact on your tests.

Test Slices

Turn integration tests into unit tests

This one requires considering that integration tests or "SpringBootTests" are really just testing that spring is configured correctly.
Most of the logic should be in fast unit tests.
Have maybe a single integration test


Switch to Jest

Use @swc-node/jest

Use babel for jest

Top comments (0)