Skip to content

Initialize PageFlowUtil url matchers only when needed #6836

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

Merged
merged 1 commit into from
Jul 12, 2025

Conversation

labkey-tchad
Copy link
Member

Rationale

Issue 53385: Selecting millions of data region rows can cause OutOfMemoryError

Creating unnecessary regex matchers for each rowId in a data region probably didn't cause the OOM error but it certainly doesn't help.

java.lang.OutOfMemoryError: Java heap space
    at java.base/java.util.regex.Pattern.matcher(Pattern.java:1134) ~[?:?]
    at org.labkey.api.util.PageFlowUtil.filter(PageFlowUtil.java:224) ~[api-25.3.11.jar:?]
    at org.labkey.api.util.PageFlowUtil.filter(PageFlowUtil.java:212) ~[api-25.3.11.jar:?]
    at org.labkey.api.util.PageFlowUtil.filter(PageFlowUtil.java:330) ~[api-25.3.11.jar:?]
    at org.labkey.api.data.DataRegion.getRecordSelectorValue(DataRegion.java:1832) ~[api-25.3.11.jar:?]
    at org.labkey.api.data.DataRegionSelection.createSelectionList(DataRegionSelection.java:512) ~[api-25.3.11.jar:?]
    at org.labkey.api.data.DataRegionSelection.setSelectionForAll(DataRegionSelection.java:444) ~[api-25.3.11.jar:?]
    at org.labkey.api.query.QueryView.selectAll(QueryView.java:3000) ~[api-25.3.11.jar:?]

Related Pull Requests

Changes

  • Initialize url pattern matcher only when needed

@labkey-tchad labkey-tchad requested review from labkey-jeckels and a team July 10, 2025 21:43
@labkey-tchad labkey-tchad merged commit 75b9e4a into release25.3-SNAPSHOT Jul 12, 2025
13 checks passed
@labkey-tchad labkey-tchad deleted the 25.3_fb_lazyUrlMatcher branch July 12, 2025 14:12
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.

2 participants