Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: Introduce RcStr #8221

Merged
merged 330 commits into from
Jun 5, 2024
Merged

perf: Introduce RcStr #8221

merged 330 commits into from
Jun 5, 2024

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented May 28, 2024

Description

If we accept : String from a function, invoking the function needs one owned String and it means allocation even if the value isn't changed. But with this PR, functions now accept RcStr, which is shared, so invoking the same function with the same value does not involve allocation for String .


I tried using Arc<String> in #7772, but a team member suggested creating a new type so we can replace underlying implementation easily in the future.

I used ast-grep with

id: convert-expr-into
language: rust
rule:
  kind: function_item
  all:
    - has:
        kind: parameters
        pattern: $PARAMS
    - any:
      - has:
          kind: visibility_modifier
          pattern: $VIS
      - not:
          has:
            kind: visibility_modifier

    - any:
      - has:
          kind: function_modifiers
          pattern: $MOD
      - not:
          has:
            kind: function_modifiers
    - has:
        field: return_type
        pattern: $RET
    - has:
        field: body
        pattern: $BODY
    - has:
        kind: identifier
        pattern: $NAME
    - follows:
        kind: attribute_item
        pattern: '#[turbo_tasks::function]'



transform:
  NEW_PARAMS:
    replace:
      replace: 'String'
      by: 'RcStr'
      source: $PARAMS

fix:
  $VIS $MOD fn $NAME $NEW_PARAMS -> $RET $BODY



Performance difference:

main:

Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 65.6s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1476 s 4.1625 s 4.1752 s]
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.5s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0396 s 4.0673 s 4.0956 s]
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 69.7s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.7222 s 4.7508 s 4.7790 s]

pr:

Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 66.2s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1175 s 4.1310 s 4.1496 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.7s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0401 s 4.0714 s 4.1105 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 70.2s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.6696 s 4.6900 s 4.7107 s]
Benchmarking bench_startup/Next.js 14 Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.9s.

@kdy1 kdy1 self-assigned this May 28, 2024
Copy link

vercel bot commented May 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 5:02am
rust-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2024 5:02am
8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-basic-web ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am
examples-designsystem-docs ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am
examples-gatsby-web ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am
examples-kitchensink-blog ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am
examples-native-web ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am
examples-svelte-web ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am
examples-tailwind-web ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am
examples-vite-web ⬜️ Ignored (Inspect) Visit Preview Jun 5, 2024 5:02am

Copy link
Contributor

github-actions bot commented May 28, 2024

🟢 Turbopack Benchmark CI successful 🟢

Thanks

Copy link
Contributor

github-actions bot commented May 28, 2024

⚠️ CI failed ⚠️

The following steps have failed in CI:

  • Turbopack Rust tests (mac/win, non-blocking)

See workflow summary for details

Copy link
Contributor

github-actions bot commented May 28, 2024

✅ This change can build next-swc

Copy link
Member

@bgw bgw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes since review LGTM, thanks!

@kdy1 kdy1 merged commit 6c24402 into main Jun 5, 2024
54 of 55 checks passed
@kdy1 kdy1 deleted the kdy1/rcstr branch June 5, 2024 05:08
kdy1 added a commit to vercel/next.js that referenced this pull request Jun 5, 2024
# Turbopack

* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->


### What?

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

### Why?

To reduce memory usage.

### How?

Closes PACK-2776
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 25, 2024
### Description

If we accept `: String` from a function, invoking the function needs one
owned `String` and it means allocation even if the value isn't changed.
But with this PR, functions now accept `RcStr`, which is shared, so
invoking the same function with the same value does not involve
allocation for `String` .

---

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

I used `ast-grep` with

```yml
id: convert-expr-into
language: rust
rule:
  kind: function_item
  all:
    - has:
        kind: parameters
        pattern: $PARAMS
    - any:
      - has:
          kind: visibility_modifier
          pattern: $VIS
      - not:
          has:
            kind: visibility_modifier

    - any:
      - has:
          kind: function_modifiers
          pattern: $MOD
      - not:
          has:
            kind: function_modifiers
    - has:
        field: return_type
        pattern: $RET
    - has:
        field: body
        pattern: $BODY
    - has:
        kind: identifier
        pattern: $NAME
    - follows:
        kind: attribute_item
        pattern: '#[turbo_tasks::function]'



transform:
  NEW_PARAMS:
    replace:
      replace: 'String'
      by: 'RcStr'
      source: $PARAMS

fix:
  $VIS $MOD fn $NAME $NEW_PARAMS -> $RET $BODY




```


### Performance difference:

#### `main`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 65.6s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1476 s 4.1625 s 4.1752 s]
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.5s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0396 s 4.0673 s 4.0956 s]
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 69.7s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.7222 s 4.7508 s 4.7790 s]
```

#### `pr`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 66.2s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1175 s 4.1310 s 4.1496 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.7s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0401 s 4.0714 s 4.1105 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 70.2s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.6696 s 4.6900 s 4.7107 s]
Benchmarking bench_startup/Next.js 14 Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.9s.
```

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

If we accept `: String` from a function, invoking the function needs one
owned `String` and it means allocation even if the value isn't changed.
But with this PR, functions now accept `RcStr`, which is shared, so
invoking the same function with the same value does not involve
allocation for `String` .

---

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

I used `ast-grep` with

```yml
id: convert-expr-into
language: rust
rule:
  kind: function_item
  all:
    - has:
        kind: parameters
        pattern: $PARAMS
    - any:
      - has:
          kind: visibility_modifier
          pattern: $VIS
      - not:
          has:
            kind: visibility_modifier

    - any:
      - has:
          kind: function_modifiers
          pattern: $MOD
      - not:
          has:
            kind: function_modifiers
    - has:
        field: return_type
        pattern: $RET
    - has:
        field: body
        pattern: $BODY
    - has:
        kind: identifier
        pattern: $NAME
    - follows:
        kind: attribute_item
        pattern: '#[turbo_tasks::function]'



transform:
  NEW_PARAMS:
    replace:
      replace: 'String'
      by: 'RcStr'
      source: $PARAMS

fix:
  $VIS $MOD fn $NAME $NEW_PARAMS -> $RET $BODY




```


### Performance difference:

#### `main`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 65.6s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1476 s 4.1625 s 4.1752 s]
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.5s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0396 s 4.0673 s 4.0956 s]
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 69.7s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.7222 s 4.7508 s 4.7790 s]
```

#### `pr`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 66.2s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1175 s 4.1310 s 4.1496 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.7s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0401 s 4.0714 s 4.1105 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 70.2s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.6696 s 4.6900 s 4.7107 s]
Benchmarking bench_startup/Next.js 14 Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.9s.
```

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Jul 29, 2024
### Description

If we accept `: String` from a function, invoking the function needs one
owned `String` and it means allocation even if the value isn't changed.
But with this PR, functions now accept `RcStr`, which is shared, so
invoking the same function with the same value does not involve
allocation for `String` .

---

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

I used `ast-grep` with

```yml
id: convert-expr-into
language: rust
rule:
  kind: function_item
  all:
    - has:
        kind: parameters
        pattern: $PARAMS
    - any:
      - has:
          kind: visibility_modifier
          pattern: $VIS
      - not:
          has:
            kind: visibility_modifier

    - any:
      - has:
          kind: function_modifiers
          pattern: $MOD
      - not:
          has:
            kind: function_modifiers
    - has:
        field: return_type
        pattern: $RET
    - has:
        field: body
        pattern: $BODY
    - has:
        kind: identifier
        pattern: $NAME
    - follows:
        kind: attribute_item
        pattern: '#[turbo_tasks::function]'



transform:
  NEW_PARAMS:
    replace:
      replace: 'String'
      by: 'RcStr'
      source: $PARAMS

fix:
  $VIS $MOD fn $NAME $NEW_PARAMS -> $RET $BODY




```


### Performance difference:

#### `main`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 65.6s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1476 s 4.1625 s 4.1752 s]
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.5s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0396 s 4.0673 s 4.0956 s]
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 69.7s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.7222 s 4.7508 s 4.7790 s]
```

#### `pr`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 66.2s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1175 s 4.1310 s 4.1496 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.7s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0401 s 4.0714 s 4.1105 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 70.2s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.6696 s 4.6900 s 4.7107 s]
Benchmarking bench_startup/Next.js 14 Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.9s.
```

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 1, 2024
### Description

If we accept `: String` from a function, invoking the function needs one
owned `String` and it means allocation even if the value isn't changed.
But with this PR, functions now accept `RcStr`, which is shared, so
invoking the same function with the same value does not involve
allocation for `String` .

---

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

I used `ast-grep` with

```yml
id: convert-expr-into
language: rust
rule:
  kind: function_item
  all:
    - has:
        kind: parameters
        pattern: $PARAMS
    - any:
      - has:
          kind: visibility_modifier
          pattern: $VIS
      - not:
          has:
            kind: visibility_modifier

    - any:
      - has:
          kind: function_modifiers
          pattern: $MOD
      - not:
          has:
            kind: function_modifiers
    - has:
        field: return_type
        pattern: $RET
    - has:
        field: body
        pattern: $BODY
    - has:
        kind: identifier
        pattern: $NAME
    - follows:
        kind: attribute_item
        pattern: '#[turbo_tasks::function]'



transform:
  NEW_PARAMS:
    replace:
      replace: 'String'
      by: 'RcStr'
      source: $PARAMS

fix:
  $VIS $MOD fn $NAME $NEW_PARAMS -> $RET $BODY




```


### Performance difference:

#### `main`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 65.6s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1476 s 4.1625 s 4.1752 s]
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.5s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0396 s 4.0673 s 4.0956 s]
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 69.7s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.7222 s 4.7508 s 4.7790 s]
```

#### `pr`:

```
Benchmarking bench_startup/Next.js canary Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 66.2s.
bench_startup/Next.js canary Turbo SSR/1000 modules
                        time:   [4.1175 s 4.1310 s 4.1496 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high severe
Benchmarking bench_startup/Next.js canary Turbo RSC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.7s.
bench_startup/Next.js canary Turbo RSC/1000 modules
                        time:   [4.0401 s 4.0714 s 4.1105 s]
Found 1 outliers among 10 measurements (10.00%)
  1 (10.00%) high mild
Benchmarking bench_startup/Next.js canary Turbo RCC/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 70.2s.
bench_startup/Next.js canary Turbo RCC/1000 modules
                        time:   [4.6696 s 4.6900 s 4.7107 s]
Benchmarking bench_startup/Next.js 14 Turbo SSR/1000 modules: Warming up for 3.0000 s
Warning: Unable to complete 10 samples in 60.0s. You may wish to increase target time to 63.9s.
```

---------

Co-authored-by: Benjamin Woodruff <benjamin.woodruff@vercel.com>
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 14, 2024
# Turbopack

* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->


### What?

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

### Why?

To reduce memory usage.

### How?

Closes PACK-2776
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 15, 2024
* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

To reduce memory usage.

Closes PACK-2776
ForsakenHarmony pushed a commit to vercel/next.js that referenced this pull request Aug 16, 2024
* vercel/turborepo#8272 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.8` -->
* vercel/turborepo#8262 <!-- Alexander Lyon - add
crate to calculate prehashes -->
* vercel/turborepo#8174 <!-- Tobias Koppers - use
prehash to avoid rehashing the key in the task cache -->
* vercel/turborepo#7674 <!-- Alexander Lyon - [turbo
trace] add ability to filter by value and occurences -->
* vercel/turborepo#8287 <!-- Donny/강동윤 - feat:
Update `swc_core` to `v0.92.10` -->
* vercel/turborepo#8037 <!-- Alexander Lyon - create
turbo-static for compile time graph analysis -->
* vercel/turborepo#8293 <!-- Will Binns-Smith - Sync
Cargo.lock with Next.js -->
* vercel/turborepo#8239 <!-- Benjamin Woodruff -
Reduce amount of code generated by ValueDebugFormat -->
* vercel/turborepo#8304 <!-- Benjamin Woodruff -
Minor optimizations to the codegen of TaskFnInputFunction -->
* vercel/turborepo#8221 <!-- Donny/강동윤 - perf:
Introduce `RcStr` -->

I tried using `Arc<String>` in
vercel/turborepo#7772, but a team member suggested
creating a new type so we can replace underlying implementation easily
in the future.

To reduce memory usage.

Closes PACK-2776
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants