Performance issues after upgrade from 3.5.x to 4.x CE in embedded DB

we are using version 3.5.x of the Community Edition successfully as an embedded DB in a project. There we store a pretty simple category tree. But each category node has a lot of properties. We rebuild that tree pretty often and recognized a huge performance decrease from 3.5.x to 4.x (does not matter if 4.0.x, 4.1.x or 4.2.0). The "setProperty" method gets slower the more properties are set. This is something we do not see with 3.x. There it stays at the same speed.
It also does not matter how often we commit. And we also played around with the DB settings. It all does not make any difference.
What might go wrong here? I could provide sample Java code and statistics if needed.