codbex / codbex-electra

e-Commerce Backoffice Management Application
https://codbex.com
Eclipse Public License 2.0
0 stars 0 forks source link

Synchronization optimization - use cache API to reduce calls to DB #116

Closed iliyan-velichkov closed 5 months ago

iliyan-velichkov commented 5 months ago

Use Dirigible cache API to reduce calls to DB during the synchronization. For example, currently, language references are fetch from DB using DAOs every time.

iliyan-velichkov commented 5 months ago

fix for cache API - https://github.com/eclipse/dirigible/pull/3851

iliyan-velichkov commented 5 months ago

Currently, zones replication which are 4108 entries takes around 2min and 44 seconds

2024-04-30 09:46:00.000 [INFO ] [Camel (camel-1) thread #125 - cron:TriggerZonesReplication] [background] OpenCartZonesOutboundReplication - Replicating zones to OpenCart DB...
2024-04-30 09:48:41.889 [INFO ] [Camel (camel-1) thread #125 - cron:TriggerZonesReplication] [background] OpenCartZonesOutboundReplication - Successfully replicated zones to all enabled OpenCart stores
2:41

2024-04-30 10:01:00.000 [INFO ] [Camel (camel-1) thread #125 - cron:TriggerZonesReplication] [background] OpenCartZonesOutboundReplication - Replicating zones to OpenCart DB...
2024-04-30 10:03:43.268 [INFO ] [Camel (camel-1) thread #125 - cron:TriggerZonesReplication] [background] OpenCartZonesOutboundReplication - Successfully replicated zones to all enabled OpenCart stores
2:43

2024-04-30 10:16:00.000 [INFO ] [Camel (camel-1) thread #125 - cron:TriggerZonesReplication] [background] OpenCartZonesOutboundReplication - Replicating zones to OpenCart DB...
2024-04-30 10:18:47.776 [INFO ] [Camel (camel-1) thread #125 - cron:TriggerZonesReplication] [background] OpenCartZonesOutboundReplication - Successfully replicated zones to all enabled OpenCart stores
2:47
iliyan-velichkov commented 5 months ago
iliyan-velichkov commented 5 months ago

add more cache - https://github.com/codbex/codbex-electra/commit/81074f7b7164624b53912c8b28c8bbacc03da493