Performance degrade with many calls to com.day.crx.persistence.tar.index.IndexFile.getEntry
上次更新時間 Apr 29, 2021 03:41:37 PM GMT | 亦適用於 CRX
- Profiling or thread dumps show many calls to com.day.crx.persistence.tar.index.IndexFile.getEntry
- Listing of files under version workspace reveals presence of many tar index files (usually they are less than 5 tar index files)
When tar files are manually optimized using CRX console or custom script by creating optimize.tar, the tar index files are not merged automatically
Analysis / Resolution
On analysis of the results of profiling tool and thread dumps, it shows many calls to com.day.crx.persistence.tar.index.IndexFile.getEntry
When we manually perform tarpm optimization then 'index merging of tar files' is not performed. This needs to be done separately using CRX console or can be automated using wget/curl. It is located here:
- Trigger tar index merge on a regular basis, or when it reaches a certain threshold (eg. 20 tar index files). You can create a simple monitoring which will notify in case of significant increase of index files with threshold specified.
- Automatic, scheduled Tar PM optimization does include an index merge: at the very
beginning of the scheduled optimization, and at the very end. Therefore, in case of manual tarpm optimization, it is recommended to schedule the index merge of tar files before and after tarpm optimization.