September 25 2016, 22:06

Update on the blog about Hybris. I found a way to speed up data import into hybris by two times.

Briefly, during data import, hybris makes three requests (not to the database, but internal ones, which without cache, turn into three database queries): locate an item by certain criteria, retrieve all information (model) about it, modify the item. The locate/retrieve steps are cached, which provides some acceleration, but it’s better to eliminate them if possible.

In my solution, the first two requests are absent. For instance, when updating prices or stock, it is senseless to look at existing data – it needs to be overwritten with fresh info. Tests show a twofold difference.

The fastest method – writing directly into the database, is highly discouraged by hybris, for many reasons. This method is kosher, as it uses a mechanism officially presented by hybris (although, recently). What is described in the blog is not documented by SAP, and it also has certain flaws and limitations. However, for updates like prices and stock, for example, it is 100% suitable.

Leave a comment