After the optimazation, the runtime is cut to 22 seconds. There are three methods used to optimize the application:
1. Use indexed collection (google cqengine) instead of looping the collection
It needs more than 30 seconds for 30 million loops, after the update, it only needs 1 or 2 seconds.
2. Set -Xms -Xmx to allocate more memory for this Java application.
3. At the beginning, the csv report file is saved to clob directly. Now since it's more than 10 megabytes, it needs 6 to 8 seconds to insert.
After zip/save to blob, it's less than 1 seconds including the zip time.
No comments:
Post a Comment