https://github.com/jmix-framework/jmix-data-performance-tests
https://github.com/jmix-framework/jmix-data-performance-tests
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jmix-framework/jmix-data-performance-tests
- Owner: jmix-framework
- Created: 2023-01-29T12:59:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-21T13:59:57.000Z (about 1 year ago)
- Last Synced: 2025-03-21T15:08:50.711Z (about 1 year ago)
- Language: Java
- Size: 88.9 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Jmix Data Performance Tests
This project demonstrates different approaches to saving data in [Jmix](https://jmix.io) framework and compares their performance.
The tests use the same model: [Employee](src/main/java/com/company/demo/entity/Employee.java) entity which has a few string, date and number attributes and a reference to the [Department](src/main/java/com/company/demo/entity/Department.java).
All tests save 10_000 new instances of the `Employee` entity.
See [DataManagerTest](src/test/java/com/company/demo/DataManagerTest.java), [EntityManagerTest](src/test/java/com/company/demo/EntityManagerTest.java), [JdbcTest](src/test/java/com/company/demo/JdbcTest.java) classes.
Results of the execution on MacBook M1 Pro:
Using `DataManager`:
- DataManagerTest.oneByOne: 14784 ms
- DataManagerTest.oneByOne_discardSaved: 5860 ms
- DataManagerTest.oneByOne_discardSaved_unconstrained: 3103 ms
- DataManagerTest.allAtOnce_discardSaved_unconstrained: 1918 ms
- DataManagerTest.inBatches (100): 1110 ms
- DataManagerTest.inBatches_unconstrained (100): 893 ms
Using `EntityManager`:
- EntityManagerTest.oneByOne: 3465 ms
- EntityManagerTest.inBatches (100): 1544 ms
- EntityManagerTest.allAtOnce: 989 ms
Using `JdbcTemplate`:
- JdbcTest.oneByOne: 1721 ms
- JdbcTest.inBatches (100): 866 ms