Skip to content

Commit

Permalink
Feature/zap profiling (#913)
Browse files Browse the repository at this point in the history
* node-cache: return refs instead of clone for speed.
* add '--disableDbCaching' flag
* reduce heap usage by 50% (118MB -> 58.8MB via Chrome Heap Profiler) via disabling source map during build
* improve generation speed by 75% via SQL query caching

Using full-th sample app as reference, there are 108,871 SQL query calls
spread over the following query functions

* selectAtomicType()
* selectBitmapByName()
* selectDataTypeByName()
* selectEnumByName()
* selectNumberByName()
* selectStructByName()

Performance metric:
  test runner: ./src-script/gen-test-runner.js
  machine: macbook 2.6 Ghz 6-core Intel Core i7 / 32GB DDR4

  Before:
    average generation time: 42.851s

  After:
    initial cache warm up generation time: 17.699s
    average generation time: 11.766s
  • Loading branch information
Jing T authored Mar 2, 2023
1 parent 4bcb914 commit 54ebd9e
Show file tree
Hide file tree
Showing 17 changed files with 497 additions and 142 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ coverage
cypress-coverage
reports

# clinic.js performance profiling data
.clinic

# Downloaded artifacts from Nexus / Github / etc via download-artifact script
artifacts
**/zap-*.zip
Expand Down
Loading

0 comments on commit 54ebd9e

Please sign in to comment.