Skip to content

Conversation

itchyny
Copy link
Contributor

@itchyny itchyny commented Jun 13, 2025

This reverts 96e8d89. The change
introduced a serious performance regression as reported in #3345.
Fixes #3345.

…teration (jqlang#3205)

This reverts 96e8d89. The change
introduced a serious performance regression as reported in jqlang#3345.
@itchyny itchyny force-pushed the fix-reduce-foreach-state-var-revert branch from a138ee5 to f59e8dc Compare June 13, 2025 22:59
Copy link
Member

@wader wader left a comment

Choose a reason for hiding this comment

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

That is unfortunate :( any ideas for fix a without performance regression?

@itchyny
Copy link
Contributor Author

itchyny commented Jun 17, 2025

Unfortunately, I have no idea to archive both supporting UPDATE without emitting a value and non-holding the reference. But I think using select in the UPDATE query is verrrrrrrry rare use case and few both notice the weird null resetting.

@itchyny itchyny changed the title Revert "fix: reduce/foreach state variable should not be reset each iteration (#3205) Revert "fix: reduce/foreach state variable should not be reset each iteration" Jun 17, 2025
@itchyny itchyny merged commit edbc1da into jqlang:master Jun 17, 2025
28 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jul 2, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [jqlang/jq](https://github.com/jqlang/jq) | patch | `1.8.0` -> `1.8.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>jqlang/jq (jqlang/jq)</summary>

### [`v1.8.1`](https://github.com/jqlang/jq/releases/tag/jq-1.8.1): jq 1.8.1

[Compare Source](jqlang/jq@jq-1.8.0...jq-1.8.1)

This is a patch release to fix security, performance, and build issues found in 1.8.0.
Full commit log can be found at <jqlang/jq@jq-1.8.0...jq-1.8.1>.

#### Security fixes

- CVE-2025-49014: Fix heap use after free in `f_strftime`, `f_strflocaltime`.
  [@&#8203;wader](https://github.com/wader) [`499c91b`](jqlang/jq@499c91b)
- GHSA-f946-j5j2-4w5m: Fix stack overflow in `node_min_byte_len` of oniguruma.
  [@&#8203;wader](https://github.com/wader) [`5e159b3`](jqlang/jq@5e159b3)

#### CLI changes

- Fix assertion failure when syntax error happens at the end of the query. [@&#8203;itchyny](https://github.com/itchyny) [#&#8203;3350](jqlang/jq#3350)

#### Changes to existing functions

- Fix portability of `strptime/1` especially for Windows. [@&#8203;itchyny](https://github.com/itchyny) [#&#8203;3342](jqlang/jq#3342)

#### Language changes

- Revert the change of `reduce`/`foreach` state variable in 1.8.0 ([#&#8203;3205](jqlang/jq#3205)).
  This change was reverted due to serious performance regression. [@&#8203;itchyny](https://github.com/itchyny) [#&#8203;3349](jqlang/jq#3349)

#### Documentation changes

- Add LICENSE notice of NetBSD's `strptime()` to COPYING. [@&#8203;itchyny](https://github.com/itchyny) [#&#8203;3344](jqlang/jq#3344)

#### Build improvements

- Fix build on old Mac with old sed. [@&#8203;qianbinbin](https://github.com/qianbinbin) [#&#8203;3336](jqlang/jq#3336)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever MR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDAuNjIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.8.0] Performance Issue on large array update.
2 participants