Skip to content

Commit

Permalink
Memorize JSON decoders and encoders (#759)
Browse files Browse the repository at this point in the history
* Memorize JSON decoders and encoders

* Fix CI build

* Fix Site build

* Less memory consumption and faster instantiation of case class decoders

* Use aliases support of `StringMatrix` for lesser in-memory footprint of case class decoders and faster parsing of fields with aliased keys

* Lesser in-memory footprint for case class decoders

* Proper hashCode/equals for keys of JSON encoder/decoder caches
  • Loading branch information
plokhotnyuk authored Dec 30, 2024
1 parent 56fe073 commit 7097284
Show file tree
Hide file tree
Showing 3 changed files with 273 additions and 195 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
Expand All @@ -25,14 +25,16 @@ jobs:
with:
fetch-depth: 0
- name: Setup Scala and Java
uses: olafurpg/setup-scala@v13
uses: coursier/setup-action@v1
with:
apps: sbt
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Lint code
run: sbt fmtCheck fixCheck

build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
Expand All @@ -47,6 +49,7 @@ jobs:
- uses: coursier/setup-action@v1
with:
jvm: ${{ matrix.java }}
apps: sbt
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install Bohem GC
Expand All @@ -56,21 +59,23 @@ jobs:
run: sbt ++${{ matrix.scala }}! test${{ matrix.platform }}

ci:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: [build,lint]
steps:
- run: echo "All checks passed"

publish:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
timeout-minutes: 45
needs: [build,lint]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3.0.0
with:
fetch-depth: 0
- uses: olafurpg/setup-scala@v13
- uses: coursier/setup-action@v1
with:
apps: sbt
- run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ jobs:
uses: actions/checkout@v3.3.0
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
- uses: coursier/setup-action@v1
with:
distribution: temurin
java-version: 17
check-latest: true
apps: sbt
- name: Check artifacts build process
run: sbt +publishLocal
- name: Check website build process
Expand All @@ -40,12 +37,9 @@ jobs:
uses: actions/checkout@v3.3.0
with:
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
- uses: coursier/setup-action@v1
with:
distribution: temurin
java-version: 17
check-latest: true
apps: sbt
- name: Setup NodeJs
uses: actions/setup-node@v3
with:
Expand All @@ -65,12 +59,9 @@ jobs:
with:
ref: ${{ github.head_ref }}
fetch-depth: '0'
- name: Setup Scala
uses: actions/setup-java@v3.9.0
- uses: coursier/setup-action@v1
with:
distribution: temurin
java-version: 17
check-latest: true
apps: sbt
- name: Generate Readme
run: sbt docs/generateReadme
- name: Commit Changes
Expand Down
Loading

0 comments on commit 7097284

Please sign in to comment.