View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003504 | SymmetricDS | Improvement | public | 2018-03-26 07:54 | 2018-06-05 20:55 |
Reporter | woehrl01 | Assigned To | mmichalek | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.9.8 | ||||
Target Version | 3.9.8 | Fixed in Version | 3.9.8 | ||
Summary | 0003504: SyncTrigger slow due to synchronized this.getClass() on AbstractDatabasePlatform.getTableFromCache | ||||
Description | I profiled the SyncTrigger step and found out that the most time on a new startup is due to a long wait time in the method AbstractDatabasePlatform.getTableFromCache. Also most of the time is spent in fetching the data from the database and all the fetching should be executed on working threads. (see inactivateTriggers() -> futures -> awaitTermination. But because of synchronized this.getClass() in AbstractDatabasePlatform.getTableFromCache all these calls are serialized. As I don't see a benefit in domain logic of having this synchronized, I'd suggest removing the synchronized in resetCachedTableModel() + getTableFromCache() and replacing the HashMap with a ConcurrentHashMap<>() I can provide a PR if desired, but I'm not sure if I overlocked something. | ||||
Tags | No tags attached. | ||||
|
ConcurrentHashMap caused Nullpointer. tableCache = Collections.synchronizedMap(new HashMap<String, Table>()); worked. |
|
see https://github.com/JumpMind/symmetric-ds/pull/88 |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-03-26 07:54 | woehrl01 | New Issue | |
2018-04-03 04:25 | mkurz | Note Added: 0001160 | |
2018-05-08 11:22 | woehrl01 | Note Added: 0001181 | |
2018-05-09 15:53 | mmichalek | Assigned To | => mmichalek |
2018-05-09 15:53 | mmichalek | Status | new => resolved |
2018-05-09 15:53 | mmichalek | Resolution | open => fixed |
2018-05-09 15:53 | mmichalek | Product Version | => 3.9.8 |
2018-05-09 15:53 | mmichalek | Fixed in Version | => 3.9.8 |
2018-05-09 15:53 | mmichalek | Target Version | => 3.9.8 |
2018-06-05 20:55 | mmichalek | Status | resolved => closed |