Revert "fix: reduce/foreach state variable should not be reset each iteration"#3349
Merged
itchyny merged 1 commit intojqlang:masterfrom Jun 17, 2025
Merged
Conversation
…teration (jqlang#3205) This reverts 96e8d89. The change introduced a serious performance regression as reported in jqlang#3345.
a138ee5 to
f59e8dc
Compare
wader
approved these changes
Jun 14, 2025
Member
wader
left a comment
There was a problem hiding this comment.
That is unfortunate :( any ideas for fix a without performance regression?
Contributor
Author
|
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. |
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`. [@​wader](https://github.com/wader) [`499c91b`](jqlang/jq@499c91b) - GHSA-f946-j5j2-4w5m: Fix stack overflow in `node_min_byte_len` of oniguruma. [@​wader](https://github.com/wader) [`5e159b3`](jqlang/jq@5e159b3) #### CLI changes - Fix assertion failure when syntax error happens at the end of the query. [@​itchyny](https://github.com/itchyny) [#​3350](jqlang/jq#3350) #### Changes to existing functions - Fix portability of `strptime/1` especially for Windows. [@​itchyny](https://github.com/itchyny) [#​3342](jqlang/jq#3342) #### Language changes - Revert the change of `reduce`/`foreach` state variable in 1.8.0 ([#​3205](jqlang/jq#3205)). This change was reverted due to serious performance regression. [@​itchyny](https://github.com/itchyny) [#​3349](jqlang/jq#3349) #### Documentation changes - Add LICENSE notice of NetBSD's `strptime()` to COPYING. [@​itchyny](https://github.com/itchyny) [#​3344](jqlang/jq#3344) #### Build improvements - Fix build on old Mac with old sed. [@​qianbinbin](https://github.com/qianbinbin) [#​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-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts 96e8d89. The change
introduced a serious performance regression as reported in #3345.
Fixes #3345.