Skip to content

[Bug]: (High Priority) Editor Memory Usage #801

Open

Description

Description

User report:

Yo I think I found an edge case issue with DxMessaging that probably hasn't been an issue for anyone until now, but with extended Claude agent design and review loops spanning 24hr+, this may become more prevalent:
image

We should consider a redesign of this - do we need to be parsing logs? Do we need to be storing logs? Can we think about this in a more efficient, optimal way, and achieve the same results?

Steps to Reproduce

Run long agentic sessions creating tons of logs

Expected Behavior

Zero issues

Actual Behavior

High editor memory usage

Unity Version

6000.x

Package Version

3.3.0

Platform

  • Editor
  • Windows
  • macOS
  • Linux
  • iOS
  • Android
  • WebGL
  • Other

Additional Context

No response

Activity

  1. wallstop commented on Nov 19, 2026

    @wallstop
    CollaboratorAuthor

    Prospective first investigation. Does the reported long Editor session show growth in a DxMessaging-owned log collection or repeat scan, and does the same path exist on current master? The reported package maps to v3.3.0 at 8fcab51e55896814288ef10b9ef59869438fa58c; current baseline f2c95f254320c5f372173f1352e538ddd4c13b9d contains earlier Console work. The attachment will establish which method, source of logs and memory observation were actually reported. A useful RED requires a specific retained object, allocation or repeated work measure on the same input and exact source. If a portable probe can exercise that path, bind the real code and distinguish retained storage from transient parsing and from Unity's own console. GREEN would preserve relevant diagnostics, duplicate and clear semantics, and existing gates on the same inputs. Keep the original report, input scope and any adverse results in .artifacts/session516/editor-memory-801/. Stop at missing source/profile provenance, unavailable Unity-owned data, no attributable RED or a needed shared tool change. Keep the historical #613 cause and its existing evidence separate.

  2. wallstop commented on Nov 19, 2026

    @wallstop
    CollaboratorAuthor

    Source tracing identifies a distinct bounded allocation question. The opted-in LogEntries path on f2c95f25 retains every nonempty message in a temporary list while enumerating the console, then passes the list to BaseCallLogMessageParser. The initial capacity ceiling does not cap growth. The original screenshot reports a 44-hour session, an Editor log with 6.7 million lines and an unattributed scanner-frame OOM. It does not establish the live Console row count, the effective settings or the allocation owner.

    Freeze the exact current harvest and parser with a controlled reflection-source or exact-method projection and a deterministic mixed console corpus. Use both supported diagnostic forms, duplicate and clear or empty controls, and many unrelated rows. The hypothesis and RED are that the actual harvest retains unrelated strings until enumeration ends and exhibits additional transient allocation or live input storage on the same rows. A bounded early candidate screen must preserve every parseable line, full row order and reads, parser/aggregate results, and the release of the enumeration lock. GREEN requires equivalent diagnostic output plus a measured drop in retained candidate inputs or allocated bytes with the same row source, and the normal tests and exact delivery gates. Stop on missing exact-method binding, an attributable result outside this scope, any result or cleanup change, or a required shared editor/tool change. Retain .artifacts/session516/editor-memory-801/. This scope leaves the historical OOM cause and separate compiler-feed routing out of the conclusion.

  3. wallstop commented on Nov 19, 2026

    @wallstop
    CollaboratorAuthor

    The controlled whole-file experiment reproduced a current opt-in Console buffer gap independently of the reported crash. Exact f2c95f25 keeps 1,014 and 16,374 unrelated strings alive until EndGettingEntries for deterministic corpora of 1,024 and 16,384 rows. Fixed 5c3314160762c027303d18b04f1128b49e3bb7e7 retains zero in both, with all rows read in order, complete diagnostic snapshots and one paired Start/End when enumeration is acquired. For prebuilt rows the 1,024-row median is unchanged at 41,280 bytes and the 16,384-row median falls from 655,776 to 409,920 bytes across four paired process profiles. The malformed fake count preserves its exception and no longer acquires an enumeration it cannot release. Fault-path bytes are adverse in two of four runs (54,184 vs 47,992) and equal in two. Default-off still does zero Console queries. Portable fake Unity Console only; no historical OOM cause, Editor RSS, native allocation, or timing finding. Full 1,722 managed generator/analyzer tests pass, including the one new parser regression. The related #802 correction is staged independently with the same recognizer. Combined final review and exact ordinary CI are pending. Evidence .artifacts/session516/editor-memory-801/fix-receipt.md.

  4. wallstop commented on Nov 19, 2026

    @wallstop
    CollaboratorAuthor

    The current-buffer correction is now in independent release work PR #804, exact da3552738388e2522afa0fea9216250edf025a7e, tree 71e6e12eced0f2d23aaae12754ffdc7e34e61e93, synthetic dd63ce3f438deba2900fb98045bb03ccd24a81cb. The report stays open for actual original Editor settings, raw trace or controlled native reproduction and attributable allocation evidence. The qualification on the measured portable full scan carries only to the unchanged harvest function.

  5. wallstop commented on Nov 19, 2026

    @wallstop
    CollaboratorAuthor

    The independently measured Console-buffer correction is delivered in #804 at 4a1fc379919c71ca904cab3865dc222085c36a7f. Exact head d1131175 passed protected Unity with unchanged f2 inventories and full cleanup. This issue stays open for the reported crash. The screenshot gives old Editor.log line volume, no matching Console row count, original settings, raw failure trace, or allocation source. Use the original environment with that evidence, or a controlled native reproduction with attributable memory, to distinguish the historical cause. Reuse the retained portable before/after measurements only for the fixed current harvest scope.

  6. wallstop commented on Nov 22, 2026

    @wallstop
    CollaboratorAuthor

    While the release PR runs, I’ll check a separate Console buffer boundary on master 1362ebb12. The shipped candidate screen accepts any row starting with an apostrophe. Reuse the exact-source portable Console projection and replace only unrelated fixture rows with ordinary quoted tool output. The positive diagnostic rows, selected counts, order, and Start/End checks stay fixed. Predict that quoted unrelated rows remain live until End while the same plain rows do not. Stop if diagnostic snapshots, source identity or exception controls drift. This screen is about the current opt-in path. It leaves the historical Unity OOM attribution open. Evidence is under .artifacts/session-goal-quote-console/.

    DISCLOSURE: LLM-GENERATED TEXT

  7. wallstop commented on Nov 22, 2026

    @wallstop
    CollaboratorAuthor

    The quoted-row projection reproduced the current buffer gap. With the same diagnostic snapshots and ordering, 1,014 of 1,024 and 16,374 of 16,384 unrelated quoted strings remain live at End. Both plain controls retain zero. At 16,384 rows the three larger quoted runs allocate 655,776, 655,776 and 656,208 bytes for the harvest versus 409,920, 409,920 and 410,352 for plain rows.

    I’ll check a local candidate that tests the first word after a bare diagnostic's quoted type against the five parser formats. Preserve the existing location-prefix check. Require all parser-positive fixtures, including Unicode whitespace and an apostrophe-starting source path, plus the prior snapshot, row-order and cleanup controls. The same quoted corpus must retain zero unrelated strings and the larger run must improve allocated bytes. Stop on a parsing or behavior difference. This remains portable evidence for the current opt-in path.

    DISCLOSURE: LLM-GENERATED TEXT

  8. wallstop commented on Nov 22, 2026

    @wallstop
    CollaboratorAuthor

    Local commit 1512a086 on work/801-filter-quoted-console reduces retention for the reproduced quoted-row case. Both the 1,024 and 16,384 row fixtures now retain zero unrelated strings at End. All three larger quoted harvests allocate exactly 245,856 fewer bytes than before. The plain controls, diagnostic snapshots, row order, first location, fault and default-off checks pass.

    The maintained parser regression fails on the baseline quoted case and passes with the candidate. It also checks all five accepted formats with normal and Unicode whitespace and with an apostrophe-leading source path. The exact parser compiles as C# 9 against .NET Standard 2.1 references. All 2,251 generator and analyzer tests, repository validation, formatting and commit hooks passed. Evidence is under .artifacts/session-goal-quote-console/.

    The candidate addresses the controlled opt-in collection behavior. The original Unity OOM still needs the actual project settings and attributable memory evidence, or an admitted native reproduction.

    DISCLOSURE: LLM-GENERATED TEXT

  9. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    Source review of the prepared 1512a086 filter found two remaining candidate paths: a quoted package status beginning with “is” and ordinary output that mentions a DXMSG identifier. I will test both in the retained exact-source Console projection before changing the filter. The expected RED is that these unrelated strings stay live at End while all diagnostic snapshots and plain controls still pass.

    The candidate will require the accepted location-prefix shape when an identifier is merely mentioned, and the diagnostic's “is excluded” opening for that bare shape. Require the five original diagnostic formats, Unicode whitespace, the apostrophe-leading path, first location, row order, fault and paired enumeration checks. Require no retained unrelated strings or allocation regression in the plain control. Compile against the maintained .NET Standard 2.1 profile. Stop on lost diagnostics, runtime compatibility trouble, or a measured plain-control regression. Raw evidence will be under .artifacts/session-goal-console-candidate-review/. The historical Unity OOM remains unassigned.

    DISCLOSURE: LLM-GENERATED TEXT

  10. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    Local 06a8d391 on work/801-review-filter-head carries the original quoted-row fix onto master 93a27c4b and tightens the two remaining shapes identified in review.

    The prior local filter kept 1,014 of 1,024 and 16,374 of 16,384 unrelated strings alive at the end of each harvest for both new corpora. The two corpora contain quoted package statuses and ordinary mentions of DXMSG006. The revised filter retains zero in all four runs. Median allocation drops by 245,856 bytes for each 16,384-row corpus. The plain and previously fixed quoted controls preserve their exact allocation observations. All diagnostic snapshots, first locations, fault responses, row order, Start/End calls and default-off behavior match.

    The parser compiles with C# 9 against .NET Standard 2.1. All 2,251 generator and analyzer tests, repository validators, formatting and hooks pass. Raw evidence is under .artifacts/session-goal-console-candidate-review/. Native Editor behavior and the reported Unity OOM still require their own evidence.

    DISCLOSURE: LLM-GENERATED TEXT

  11. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    I’ll check whether the previously qualified Console filter at 06a8d391 applies to combined local release candidate b06ed1b7. The release candidate has the merged Console-buffer correction from #804 and uses the earlier broad prefilter. I’ll bind the portable reflection probe to the exact production sources at both revisions and run the established plain, quoted tool output, quoted package status, and diagnostic-ID prose corpora. The expected red observation is unrelated row strings retained through End. The candidate must eliminate that retention, reduce measured allocations on those affected corpora, preserve exact diagnostic snapshots and enumeration behavior, and pass the full compiler suite and the C# 9 / .NET Standard 2.1 parser build. I’ll stop the replay if any diagnostic shape is lost, a control regresses, or the source comparison includes an unrelated change. Raw evidence will be retained in .artifacts/session-goal-801-release-draft/. This portable probe cannot establish the cause of the historical Windows Unity OOM.

  12. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    The stricter filter is replayed at local ea44292d315e642a59f34982d317cf348b5b696a (tree a0df380e1a03817cf679d202d21de3bbce2a05bd), using the exact parser and test blobs previously qualified at 06a8d391. The harvester and aggregator inputs were byte-identical in the matched comparison. The regression test failed on the combined parent b06ed1b7 for quoted tool output and passed with the filter.

    For each of quoted tool output, quoted package statuses, and prose mentioning DXMSG006, the parent retained 1,014 of 1,024 and 16,374 of 16,384 unrelated strings at End. The candidate retained zero at both sizes. Median allocation savings on the large corpora were 245,856, 245,856, and 245,424 bytes respectively across three scans per cell. At 1,024 rows, liveness improved and allocated bytes stayed equal, consistent with the existing 1,024-entry initial buffer. The plain corpus kept zero retained and the same allocations at both sizes. Exact snapshots, all row/ordering and enumeration observations, and injected-error checks matched.

    The C# 9/.NET Standard 2.1 parser build, all 2,251 compiler tests, npm run validate:all, and normal commit hooks passed. A fresh bare repository restored all four local review commits against hosted #821 head 20ca2b37, with exact identity. Probe receipt SHA-256 52d7eb4b642c4e495e3a0d6388a4fa5f72d995c2be970600564f9ccb361b4436; local Git bundle SHA-256 d1910309a00cdeeaa52713786e0aff4244e67bcfad94c6b978dea5b7191a62ac. Unity Editor validation and attribution of the original Windows OOM remain open.

  13. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    I found a standalone regression-coverage gap while reviewing the Console candidate. The compiler test project links four Editor analyzer sources directly, but the static workflow's dotnet selector does not name any of them. I’ll test the actual selector at hosted head 0d71d9e8 with a PR changing just each linked file. Expected RED is the compiler lane skipping. The candidate will enable that lane for all four linked inputs, preserve existing managed and documentation decisions and fail-closed behavior, and keep an unrelated Editor-only analyzer file excluded from the compiler lane. I’ll run the existing workflow regression and validators and stop if an unrelated lane changes. Local artifacts will be in .artifacts/session-goal-801-ci-inputs/. The queued Unity run for #821 will keep its current head.

  14. wallstop commented on Nov 23, 2026

    @wallstop
    CollaboratorAuthor

    The CI input gap is reproduced and fixed locally at eb13ff508c3f5e3ee4dafa1d991606a049d53905 on hosted #821 head 0d71d9e8. On the baseline, single-file changes to each of BaseCallLogMessageParser.cs, BaseCallReportAggregator.cs, BaseCallIlInspector.cs and BaseCallTypeScannerCore.cs return dotnet=false. With the fix, all four select the compiler lane and every other selector output matches. The unrelated Console harvester, docs and non-matching path controls have unchanged outputs. The focused regression reproduced RED, and the full workflow fixture passed with the correction.

    All 1,502 Node and 152 Python tests passed, along with Actionlint, yamllint, repository validation and normal hooks. A clean bare repository restored the exact local commit and tree. Rehearsal from it produced the same UPM and Classic archive bytes. Selector receipt SHA-256 253e47d6629fcdbab98eec214dc104c9d1eb3fd689da3db0f37826711f176701, bundle SHA-256 9334b7e2d7210f9a0dc556e4d7ce60b63f5846eaea5785020c008bc723349e8d. The follow-up stays local while the current Unity job is queued. The historical Windows OOM still needs its own Unity evidence.

  15. wallstop commented on Nov 24, 2026

    @wallstop
    CollaboratorAuthor

    Prospective packaged-source replay for the Console bridge mitigation. Compare the verified published 3.3.0 UPM (ec1bf6af) and staged 4.0.0 UPM (aa8b971a) by compiling their exact harvester, parser and aggregator against one controlled Editor/CompilationPipeline double. Exercise the public RescanNow entry and the subscribed compilation event. This follows the released-to-staged mechanism, while earlier probes compared two Console prefilters.

    Hypothesis and RED. With the opt-in bridge enabled and a matching diagnostic supplied to both channels, published 3.3.0 reads all Console rows. At 16,384 rows the controlled EndGettingEntries observer sees unrelated strings still alive. The staged feed should keep the same diagnostic and location with zero Console calls, and clear the warning when the same assembly compiles cleanly. Both bridges remain quiet on Console rows when off. Keep scanner and IO doubles identical.

    GREEN. Verify exact archive and source bytes, all named observations, weak-reference and warmed allocation windows separately, and the opt-in/off and cleanup controls. Stop on wrong package binding, a lost diagnostic, or an unexplained control failure. This is portable attribution of package code, with historical Windows Editor OOM and actual native memory behavior still open. Evidence .artifacts/session-goal-801-packaged-console-replay/.

  16. wallstop commented on Nov 24, 2026

    @wallstop
    CollaboratorAuthor

    The packaged-source replay passed in four fresh processes ordered 3.3.0 / 4.0.0 / 4.0.0 / 3.3.0. Each arm compiled the three exact production sources extracted from its verified UPM, using the common controlled Editor boundary. Both mislabeled arms rejected at the Console behavior assertion. The original build refusal for a missing legacy AssetDatabase double is retained; both passive settings APIs now return the same fixture setting.

    With the bridge enabled and 16,384 simulated Console rows, the 3.3.0 public rescan read all rows and held all 16,382 unrelated non-null strings at EndGettingEntries. The staged 4.0.0 rescan made zero Console count, read, start or end calls. The end-of-enumeration liveness observation therefore has no staged sample. Both packages reproduce the DXMSG006 method, file and line, retire the warning after a clean compilation, and make zero Console calls with the bridge disabled.

    Across six warmed allocation windows per size and arm, median current-thread rescan bytes were 39,864 / 3,416 at 1,024 rows and 654,360 / 3,416 at 16,384 rows for 3.3.0 / 4.0.0. The separately measured compiler event median increased from 1,784 to 2,160 bytes in both cells. The simulated compilation callback and rescan use an empty scanner double. These observations attribute the eliminated Console enumeration and its temporary retention under the controlled input. Native memory, real scanner cost and historical Windows OOM causation remain open.

    Local evidence .artifacts/session-goal-801-packaged-console-replay/, qualification SHA-256 16bb8672cef9ebdc1bff2e88bfbfb89bc4edbfb0ab9604520246052511615ae6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions