You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the SOM_LEFTMOST expression flag, all matching strings are returned within the returned list of match objects. For large strings (1+MB) and certain regexps this could cause orders of magnitude more strings to be created. If the scan method could return these strings as a lazy collection such as a Stream instead of a List, this could avoid consuming too much heap memory via the string pool. Alternatively, just the start and end offsets could be returned so the caller can control the number of strings created.
The text was updated successfully, but these errors were encountered:
Interesting use case. Returning a stream definitely makes sense for large amount of matches. I'll take a stab at implementing it. Will actually need this soon. too.
When using the SOM_LEFTMOST expression flag, all matching strings are returned within the returned list of match objects. For large strings (1+MB) and certain regexps this could cause orders of magnitude more strings to be created. If the scan method could return these strings as a lazy collection such as a Stream instead of a List, this could avoid consuming too much heap memory via the string pool. Alternatively, just the start and end offsets could be returned so the caller can control the number of strings created.
The text was updated successfully, but these errors were encountered: