Skip to content

Commit 7097284

Browse files
authored
Memorize JSON decoders and encoders (#759)
* 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
1 parent 56fe073 commit 7097284

File tree

3 files changed

+273
-195
lines changed

3 files changed

+273
-195
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515

1616
jobs:
1717
lint:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-latest
1919
timeout-minutes: 30
2020
strategy:
2121
fail-fast: false
@@ -25,14 +25,16 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727
- name: Setup Scala and Java
28-
uses: olafurpg/setup-scala@v13
28+
uses: coursier/setup-action@v1
29+
with:
30+
apps: sbt
2931
- name: Cache scala dependencies
3032
uses: coursier/cache-action@v6
3133
- name: Lint code
3234
run: sbt fmtCheck fixCheck
3335

3436
build:
35-
runs-on: ubuntu-20.04
37+
runs-on: ubuntu-latest
3638
timeout-minutes: 40
3739
strategy:
3840
fail-fast: false
@@ -47,6 +49,7 @@ jobs:
4749
- uses: coursier/setup-action@v1
4850
with:
4951
jvm: ${{ matrix.java }}
52+
apps: sbt
5053
- name: Cache scala dependencies
5154
uses: coursier/cache-action@v6
5255
- name: Install Bohem GC
@@ -56,21 +59,23 @@ jobs:
5659
run: sbt ++${{ matrix.scala }}! test${{ matrix.platform }}
5760

5861
ci:
59-
runs-on: ubuntu-20.04
62+
runs-on: ubuntu-latest
6063
needs: [build,lint]
6164
steps:
6265
- run: echo "All checks passed"
6366

6467
publish:
65-
runs-on: ubuntu-20.04
68+
runs-on: ubuntu-latest
6669
timeout-minutes: 45
6770
needs: [build,lint]
6871
if: github.event_name != 'pull_request'
6972
steps:
7073
- uses: actions/checkout@v3.0.0
7174
with:
7275
fetch-depth: 0
73-
- uses: olafurpg/setup-scala@v13
76+
- uses: coursier/setup-action@v1
77+
with:
78+
apps: sbt
7479
- run: sbt ci-release
7580
env:
7681
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}

.github/workflows/site.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ jobs:
2121
uses: actions/checkout@v3.3.0
2222
with:
2323
fetch-depth: '0'
24-
- name: Setup Scala
25-
uses: actions/setup-java@v3.9.0
24+
- uses: coursier/setup-action@v1
2625
with:
27-
distribution: temurin
28-
java-version: 17
29-
check-latest: true
26+
apps: sbt
3027
- name: Check artifacts build process
3128
run: sbt +publishLocal
3229
- name: Check website build process
@@ -40,12 +37,9 @@ jobs:
4037
uses: actions/checkout@v3.3.0
4138
with:
4239
fetch-depth: '0'
43-
- name: Setup Scala
44-
uses: actions/setup-java@v3.9.0
40+
- uses: coursier/setup-action@v1
4541
with:
46-
distribution: temurin
47-
java-version: 17
48-
check-latest: true
42+
apps: sbt
4943
- name: Setup NodeJs
5044
uses: actions/setup-node@v3
5145
with:
@@ -65,12 +59,9 @@ jobs:
6559
with:
6660
ref: ${{ github.head_ref }}
6761
fetch-depth: '0'
68-
- name: Setup Scala
69-
uses: actions/setup-java@v3.9.0
62+
- uses: coursier/setup-action@v1
7063
with:
71-
distribution: temurin
72-
java-version: 17
73-
check-latest: true
64+
apps: sbt
7465
- name: Generate Readme
7566
run: sbt docs/generateReadme
7667
- name: Commit Changes

0 commit comments

Comments
 (0)