Skip to content

M3 Search viewer: avoid full child-array copy under result limits - #31

Merged
hsoliwal merged 1 commit into
masterfrom
codex/m3-search-tree-bounded-window-20261021
Oct 22, 2026
Merged

hsoliwal merged 1 commit into
masterfrom
codex/m3-search-tree-bounded-window-20261021

Conversation

@hsoliwal

Copy link
Copy Markdown
Owner

Source-specific Problems-view-style bounded projection

This PR receives exactly one Java FILE atom from the canonical Maven/OpenRewrite recipe in Synexia #12839. It does not alter public Search/JFace APIs, filters, event delivery, callback order, or the existing single-owner content-provider map.

FileTreeContentProvider.getChildren currently invokes children.toArray() to materialize every result and then copies only the selected number when FileSearchPage's default limit is 1,000. It now traverses the same Set iterator for precisely elementLimit entries into the same returned-size array, retaining identity and iteration order. The unlimited path (-1) and the normal no-limit case are unchanged. There are no new wrappers, JNI symbols or persistent per-element objects.

  • Source blob before: dc9e000cd917359a8fed3edd04d0de044dd8cf6d
  • Source SHA-256 before: a369e231cb2328e9d2cf56d7436315ce7327065c11e3a73ed1018d2229eb6542
  • Source SHA-256 after: 36368e62b6589318bfd9d191b16a7ac0286c3b322801504c3795dc00e9465122
  • Exact byte-for-byte receiver readback: passed after deterministic one-atom kernel replay.
  • Standalone Java21 --release 21 -Xlint:all -Werror and main execution: 1,606 differential checks passed, including 100,000 set entries, colliding hash keys, -2/-1/0/default/oversized limits and original object identity/order.

Qualification boundary

Draft. This narrow local Java differential does not prove Eclipse Search runtime equivalence. Required checks not run: canonical Maven/OpenRewrite SDK, fixed-point/refusal under the actual Java parser and original file, Eclipse/Tycho build and Search/JFace/UI tests, all operating systems, end-to-end Problems/Search selection behavior, and comparative heap/CPU benchmarks. The canonical provenance gate remains open. Estimated complexity improves from O(total children) temporary enumeration to O(display limit) under the limiting branch; no measured speedup claimed.

Retains original Eclipse copyright and EPL-2.0 license. Distinct from shared JFace PRs #27/#28/#30 and Project Explorer #29. Full Claude marked-site inventory remains open for additional receivers.

@hsoliwal
hsoliwal marked this pull request as ready for review October 22, 2026 02:58
@hsoliwal
hsoliwal merged commit c4a9ad2 into master Oct 22, 2026
1 of 4 checks passed
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 participant