简体   繁体   中英

Javers comparison takes long time

We are comparing 2 objects using javers in our project. But in a delete secanrio it is taking lot of time which leads to application time out.

Is it possible to bypass the inner objects from comparison in javers.

You are not providing much information, but depending on the relations between your entities, javers might be comparing your whole database, or at least much more than you expect.

This happens, because javers will walk all relations of the object to be compared recursively. This can lead to a lot of select-statements going to the database to fetch extra objects.

You can stop it from doing that, by putting @JaversIgnore or @ShallowReference on the relations that you do not want it to compare.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM