<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: GameOptim</title>
    <description>The latest articles on DEV Community by GameOptim (@gameoptim).</description>
    <link>https://dev.to/gameoptim</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3712156%2F2856be03-78df-4cc3-848e-f48a8d1ce581.png</url>
      <title>DEV Community: GameOptim</title>
      <link>https://dev.to/gameoptim</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gameoptim"/>
    <language>en</language>
    <item>
      <title>Can You Compare GPU Counter Data Across Mali, Adreno, and PowerVR Devices?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Mon, 16 Nov 2026 06:31:18 +0000</pubDate>
      <link>https://dev.to/gameoptim/can-you-compare-gpu-counter-data-across-mali-adreno-and-powervr-devices-3fkg</link>
      <guid>https://dev.to/gameoptim/can-you-compare-gpu-counter-data-across-mali-adreno-and-powervr-devices-3fkg</guid>
      <description>&lt;p&gt;&lt;strong&gt;No. Each vendor exposes a different counter set and defines GPU load differently, so the same reading carries a different recommended value depending on the chip — compare one device against its own earlier runs, not against a different phone.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Two phones, one build, one scene, two unrelated GPU readings. That is not a measurement bug. Mali, Adreno, and PowerVR route work through different hardware schedulers, expose different counters, and accept different values for what looks like the same metric. Treating those numbers as directly comparable produces optimization decisions that do not survive contact with the other device.&lt;/p&gt;

&lt;p&gt;GameOptim GOT Online now collects GPU Counter data on &lt;strong&gt;Adreno and PowerVR&lt;/strong&gt; chips in addition to Mali, and adds &lt;strong&gt;GPU load for Mali&lt;/strong&gt; plus &lt;strong&gt;GPU load, cache behavior, and texture filtering for Adreno&lt;/strong&gt;. The sections below explain what each vendor's counters actually measure, which values indicate a problem, and where the thresholds come from — including the one configuration in which power data is not trustworthy at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GPU Counter support now covers &lt;strong&gt;Mali, Adreno, and PowerVR&lt;/strong&gt;, but the available counters and the meaning of "GPU load" differ between them.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;Mali&lt;/strong&gt;, load is a pair of ratios: &lt;strong&gt;Non Fragment Utilization&lt;/strong&gt; and &lt;strong&gt;Fragment Utilization&lt;/strong&gt;. At full load, at least one should sit near &lt;strong&gt;100%&lt;/strong&gt; while the other works in parallel.&lt;/li&gt;
&lt;li&gt;If &lt;strong&gt;both&lt;/strong&gt; Mali utilizations are clearly below 100%, the likely cause is &lt;strong&gt;serialization or a compute dependency&lt;/strong&gt; between the two work queues, not spare capacity.&lt;/li&gt;
&lt;li&gt;On &lt;strong&gt;Adreno&lt;/strong&gt;, load is read through &lt;strong&gt;GPU frequency&lt;/strong&gt;, because the question there is whether the GPU is throttling under heat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Texture L1 Cache Miss&lt;/strong&gt; on Adreno should stay &lt;strong&gt;below 15%&lt;/strong&gt; per GameOptim's recommendation; filtering mode, Mipmap enablement, and texture compression are the levers when it runs higher.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recommended values differ by chip architecture.&lt;/strong&gt; Vertical comparison on the same device is meaningful; horizontal comparison between devices is not, and only some chips support collection at all.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Power readings are only valid with USB disconnected&lt;/strong&gt; — charging or USB connection can skew them or produce negative values.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is the Core Problem?
&lt;/h2&gt;

&lt;p&gt;GPU profiling assumes a counter means the same thing on every device. It does not. A Mali GPU distributes work through a Job Manager with two FIFO queues; an Adreno GPU is better characterized by clock frequency under thermal load; a PowerVR GPU exposes load, shading, bandwidth, and primitives as four separate modules.&lt;/p&gt;

&lt;p&gt;The consequence is practical rather than academic. A "GPU load is high" finding from one device type does not translate into a specific optimization action on another, and a value inside the acceptable range on one chip can be a warning on a different chip. Coverage is partial as well: GPU Counter collection currently works on &lt;strong&gt;only some chips&lt;/strong&gt;, because architectures vary even within a single vendor's product line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do the Same Metrics Behave Differently on Different Chips?
&lt;/h2&gt;

&lt;p&gt;The difference originates in the scheduling layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mali.&lt;/strong&gt; The &lt;strong&gt;Job Manager&lt;/strong&gt; coordinates the workload and exposes two FIFO work queues to the graphics driver:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Queue&lt;/th&gt;
&lt;th&gt;Work it carries&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Queue 1&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Non Fragment&lt;/strong&gt; work — Compute shading and Vertex-related shading&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Queue 2&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Fragment&lt;/strong&gt; work&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In the ideal state the two queues run in parallel. The cycles each queue spends working, divided by the total cycles the GPU spends working, give &lt;strong&gt;Non Fragment Utilization&lt;/strong&gt; and &lt;strong&gt;Fragment Utilization&lt;/strong&gt;. Both are fractions of the same total, so they describe how work is split between the queues rather than two independent loads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adreno.&lt;/strong&gt; Load is expressed primarily as &lt;strong&gt;GPU frequency&lt;/strong&gt;. Under sustained pressure and heat, a GPU throttles much as a CPU does, and the frequency trace records when that happens.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PowerVR.&lt;/strong&gt; Load, shading, bandwidth, and primitives are exposed as separate modules. Shading, bandwidth, and primitive metrics carry the same meaning and optimization direction as their Mali equivalents.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Do You Judge Mali GPU Load?
&lt;/h2&gt;

&lt;p&gt;Read the two utilization figures together.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Observation&lt;/th&gt;
&lt;th&gt;What it means&lt;/th&gt;
&lt;th&gt;What to do next&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;At least one queue near &lt;strong&gt;100%&lt;/strong&gt;, the other active in parallel for part of the time&lt;/td&gt;
&lt;td&gt;Healthy full load — the GPU is genuinely busy&lt;/td&gt;
&lt;td&gt;Work inside the busy queue's workload type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Both clearly below 100%&lt;/td&gt;
&lt;td&gt;Possible &lt;strong&gt;serialization&lt;/strong&gt; or &lt;strong&gt;compute dependency&lt;/strong&gt; between the queues&lt;/td&gt;
&lt;td&gt;Look for work that forces one queue to wait on the other&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Non Fragment Utilization&lt;/strong&gt; high&lt;/td&gt;
&lt;td&gt;Vertex or compute work dominates&lt;/td&gt;
&lt;td&gt;Optimize vertex count, Compute Shader, Geometry Shader, Tessellation Shader&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Fragment Utilization&lt;/strong&gt; high&lt;/td&gt;
&lt;td&gt;Pixel work dominates&lt;/td&gt;
&lt;td&gt;Check for excessive &lt;strong&gt;Overdraw&lt;/strong&gt; and an overly complex &lt;strong&gt;Fragment Shader&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Why Can Both Utilizations Be Low While the Frame Still Drops?
&lt;/h3&gt;

&lt;p&gt;Low utilization on both queues reads like headroom, and teams routinely treat it as good news. If neither queue approaches saturation while frames are still being missed, the GPU is waiting on a dependency rather than running out of throughput. Adding parallelism to that situation does not help; finding the ordering constraint that serializes the two queues does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does Adreno GPU Load Tell You That Mali's Does Not?
&lt;/h2&gt;

&lt;p&gt;Frequency answers a question that utilization percentages cannot: &lt;strong&gt;is the GPU throttling?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a project carries high load and heats up noticeably, the GPU can drop its clocks the way a CPU does. A frequency curve that falls across a test session is direct evidence of thermal throttling, and it marks the scenes where the device was working hardest. That makes GPU frequency both a locator for high-pressure scenes and a thermal record of the run.&lt;/p&gt;

&lt;p&gt;This matters because throttling changes the numbers you measure. The same scene profiled at the start and at the end of a long session can report different costs on identical content, purely from clock behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Should You Read Cache Behavior on Adreno?
&lt;/h2&gt;

&lt;p&gt;Data the GPU requests and finds in cache is a &lt;strong&gt;hit&lt;/strong&gt;; data that is absent is a &lt;strong&gt;miss&lt;/strong&gt;. The Adreno counter surfaces this as &lt;strong&gt;Texture L1 Cache Miss&lt;/strong&gt; — the percentage of L1 texture cache misses.&lt;/p&gt;

&lt;p&gt;Cache misses primarily drive &lt;strong&gt;bandwidth and power consumption&lt;/strong&gt;. A higher miss rate means the GPU did more work for no result: extra memory traffic to fetch data it could not reuse.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GameOptim recommends keeping Texture L1 Cache Miss below 15%.&lt;/strong&gt; Above that, the suggested areas to investigate are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Texture filtering&lt;/strong&gt; — the filter mode changes the access pattern&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mipmap settings&lt;/strong&gt; — whether mipmaps are enabled at all&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Texture compression&lt;/strong&gt; — how much data each fetch must move&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Does Texture Filtering Data Tell You?
&lt;/h2&gt;

&lt;p&gt;The primary texture filtering parameter is &lt;strong&gt;Non-Base Level Textures&lt;/strong&gt; — textures using a Mipmap level other than 0. It is accompanied by three filter-mode metrics:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Filter mode&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Nearest Filtered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Nearest-neighbor filtering&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Linear Filtered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Linear filtering&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Anisotropic Filtered&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Anisotropic filtering&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The guidance is to prefer low-cost filtering in general and to use &lt;strong&gt;anisotropic filtering cautiously&lt;/strong&gt;, since it is the most expensive of the three. For 3D projects, confirm that &lt;strong&gt;Mipmap is enabled&lt;/strong&gt;; a project running without mipmaps will show no non-base-level texture usage at all, which makes the parameter a direct check rather than an inference.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Do PowerVR Counters Add?
&lt;/h2&gt;

&lt;p&gt;PowerVR provides four modules: &lt;strong&gt;GPU load, GPU shading, GPU bandwidth, and GPU primitives&lt;/strong&gt;. Shading, bandwidth, and primitive metrics have the same meaning and optimization direction as on Mali, so the reading method transfers directly. The practical difference is that all four are available together, which lets you check load, shading cost, memory traffic, and geometry submission in one pass instead of inferring one from another.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Are Power Readings Meaningful?
&lt;/h2&gt;

&lt;p&gt;The hardware info page now reports a &lt;strong&gt;peak power&lt;/strong&gt; parameter, alongside the device's power and current during the test.&lt;/p&gt;

&lt;p&gt;Power data earns its place for one specific reason: &lt;strong&gt;power and bandwidth are closely related&lt;/strong&gt;. High device power implies high bandwidth, so the power trace can stand in as a proxy for bandwidth behavior. That also makes it an early thermal warning, since sustained high power is what leads to heat and throttling.&lt;/p&gt;

&lt;p&gt;Two conditions limit when the number can be used:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Power is a hardware characteristic of the device&lt;/strong&gt; and varies substantially between models. Do not compare power figures across devices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;USB connection or charging heavily distorts the value&lt;/strong&gt;, producing anomalous or even negative readings. Only power and current data captured with USB disconnected is valid.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Should You Check First?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Confirm the chip is supported.&lt;/strong&gt; Collection covers only some chips. Absent data is a coverage limit, not a zero reading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify the vendor's counter model before interpreting anything.&lt;/strong&gt; Mali reports a utilization pair, Adreno reports frequency and cache behavior, PowerVR reports four modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On Mali, read both utilizations as a pair.&lt;/strong&gt; One near 100% is healthy; both low with dropped frames points at serialization or a compute dependency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On Adreno, inspect the frequency curve across the whole session.&lt;/strong&gt; A downward trend indicates throttling and identifies the responsible scenes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On Adreno, compare Texture L1 Cache Miss against the 15% recommendation.&lt;/strong&gt; If it exceeds that, check filter mode, Mipmap enablement, and compression.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;For power, disconnect USB before running the test.&lt;/strong&gt; Discard any run where the values are anomalous or negative.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare vertically.&lt;/strong&gt; Use the same device before and after a change; disregard comparisons against other devices or other chip generations.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Should You Avoid?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do not compare GPU Counter values across device brands.&lt;/strong&gt; Recommended values differ by architecture, so a healthy Mali figure can be a warning on PowerVR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not compare across chip generations within one brand either.&lt;/strong&gt; Same-vendor architectures differ, which is also why only some chips are supported.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not read two low Mali utilizations as spare capacity.&lt;/strong&gt; Both well below 100% suggests the queues are waiting on each other.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not chase utilization when the cause is thermal.&lt;/strong&gt; On Adreno, a falling frequency explains a drop that utilization percentages will not.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not reduce cache misses by changing one lever only.&lt;/strong&gt; Filter mode, Mipmap enablement, and compression all contribute to the miss rate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not trust power data captured over USB or while charging.&lt;/strong&gt; The values can invert.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not assume Mipmap is enabled in a 3D project.&lt;/strong&gt; No non-base-level texture usage is the signal that it is off.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Recommendations
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;What to inspect&lt;/th&gt;
&lt;th&gt;How to judge&lt;/th&gt;
&lt;th&gt;What to optimize&lt;/th&gt;
&lt;th&gt;What to expect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Frames drop while the GPU looks idle&lt;/td&gt;
&lt;td&gt;Mali Non Fragment / Fragment Utilization&lt;/td&gt;
&lt;td&gt;Both clearly below 100%&lt;/td&gt;
&lt;td&gt;Serialization and compute dependencies between the queues&lt;/td&gt;
&lt;td&gt;At least one utilization rising&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vertex-heavy scenes&lt;/td&gt;
&lt;td&gt;Non Fragment Utilization&lt;/td&gt;
&lt;td&gt;High relative to Fragment&lt;/td&gt;
&lt;td&gt;Vertex count, Compute / Geometry / Tessellation shader cost&lt;/td&gt;
&lt;td&gt;Lower Non Fragment load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pixel-heavy scenes&lt;/td&gt;
&lt;td&gt;Fragment Utilization&lt;/td&gt;
&lt;td&gt;High relative to Non Fragment&lt;/td&gt;
&lt;td&gt;Overdraw, Fragment Shader complexity&lt;/td&gt;
&lt;td&gt;Lower Fragment load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Frame time degrades during a session&lt;/td&gt;
&lt;td&gt;Adreno GPU frequency&lt;/td&gt;
&lt;td&gt;Frequency falling across the run&lt;/td&gt;
&lt;td&gt;The scenes running when frequency dropped&lt;/td&gt;
&lt;td&gt;A stable frequency curve&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bandwidth or battery concerns&lt;/td&gt;
&lt;td&gt;Adreno Texture L1 Cache Miss&lt;/td&gt;
&lt;td&gt;Above the 15% recommendation&lt;/td&gt;
&lt;td&gt;Filter mode, Mipmap enablement, texture compression&lt;/td&gt;
&lt;td&gt;Miss rate below 15%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3D project with unexplained texture cost&lt;/td&gt;
&lt;td&gt;Non-Base Level Textures&lt;/td&gt;
&lt;td&gt;No non-base-level usage at all&lt;/td&gt;
&lt;td&gt;Enable Mipmap&lt;/td&gt;
&lt;td&gt;Non-base-level usage appears in the data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Throttling suspected&lt;/td&gt;
&lt;td&gt;Peak power, USB disconnected&lt;/td&gt;
&lt;td&gt;Power sustained high; values anomalous over USB&lt;/td&gt;
&lt;td&gt;The bandwidth-heavy scenes driving power&lt;/td&gt;
&lt;td&gt;Lower sustained power&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mali, Adreno, and PowerVR expose different counters.&lt;/strong&gt; "GPU load" means a utilization ratio on Mali, a frequency on Adreno, and one of four modules on PowerVR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mali's two utilization figures are read as a pair.&lt;/strong&gt; One near 100% is healthy; both low suggests serialization or a compute dependency rather than headroom.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Adreno GPU frequency reveals throttling&lt;/strong&gt;, which utilization percentages cannot express.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Texture L1 Cache Miss should stay below 15%&lt;/strong&gt; by GameOptim's recommendation, with filtering, Mipmap, and compression as the levers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compare the same device over time.&lt;/strong&gt; Cross-brand and cross-generation horizontal comparison carries little meaning, and only some chips are supported.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is it valid to compare a Mali result against an Adreno result for the same scene?&lt;/strong&gt;&lt;br&gt;
Not meaningfully. The counters differ in what they measure, and the recommended values for a given parameter differ by chip architecture. The comparison that holds up is the same device measured before and after a change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does it mean when neither Mali utilization is close to 100% but frames are still late?&lt;/strong&gt;&lt;br&gt;
It suggests the two work queues are serialized or one depends on the other's output, so the GPU idles while waiting. Look for ordering constraints between Non Fragment and Fragment work rather than adding more parallel work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is an acceptable Texture L1 Cache Miss rate on Adreno?&lt;/strong&gt;&lt;br&gt;
GameOptim recommends staying below 15%. Higher rates indicate extra memory traffic and power draw from cache misses, and the areas to review are texture filtering, Mipmap settings, and texture compression.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why are my power values negative or clearly wrong?&lt;/strong&gt;&lt;br&gt;
The device was on USB or charging during the measurement. Those states strongly affect the power figure, so only runs with USB disconnected should be used.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My device shows no GPU Counter data at all. Is the collection broken?&lt;/strong&gt;&lt;br&gt;
Collection is currently supported on only some chips, since architectures differ even within one brand. Verify your chip is covered before treating the absence as a measurement of zero.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gpu</category>
      <category>gamedev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How to Optimize Unity Mobile Game Performance: A Real-World Case Study</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Tue, 10 Nov 2026 10:22:09 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-to-optimize-unity-mobile-game-performance-a-real-world-case-study-30a0</link>
      <guid>https://dev.to/gameoptim/how-to-optimize-unity-mobile-game-performance-a-real-world-case-study-30a0</guid>
      <description>&lt;p&gt;Mobile game performance optimization is rarely about fixing just one issue. Low FPS, frame-time spikes, excessive CPU usage, and GPU bottlenecks can all contribute to a poor gameplay experience.&lt;/p&gt;

&lt;p&gt;But where should you start when a Unity mobile game struggles to maintain a stable frame rate?&lt;/p&gt;

&lt;p&gt;In this case study, we'll walk through a real Unity 6 mobile game optimization process using &lt;strong&gt;GameOptim GOT Online&lt;/strong&gt;. The test covers performance profiling, CPU and GPU analysis, memory investigation, and several practical optimization techniques.&lt;/p&gt;

&lt;p&gt;The results were significant:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Average FPS:&lt;/strong&gt; Improved from 16.60 to 29.87 (+79.9%)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Frames exceeding 40ms:&lt;/strong&gt; Reduced from 94.51% to 0.19%&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's take a closer look at how the performance issues were investigated and optimized.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/78mZmCZFiXA" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>mobile</category>
      <category>gamedev</category>
      <category>performance</category>
    </item>
    <item>
      <title>How Can You Tell Whether Unity GPU Pressure Comes From Triangle Count or Shader Complexity?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Mon, 09 Nov 2026 07:19:17 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-can-you-tell-whether-unity-gpu-pressure-comes-from-triangle-count-or-shader-complexity-4gk4</link>
      <guid>https://dev.to/gameoptim/how-can-you-tell-whether-unity-gpu-pressure-comes-from-triangle-count-or-shader-complexity-4gk4</guid>
      <description>&lt;p&gt;&lt;strong&gt;Compare submitted versus visible primitives — a visible ratio far below 50% points at unsplit large models — then break Shader Cycles into arithmetic, interpolator, load-store, and texture to find which unit is the actual bottleneck.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A GPU-heavy scene usually traces back to one of two sources: too many primitives submitted for rendering, or shaders that cost too many cycles per pixel. Both end in the same symptoms — heat, throttling, dropped frames — but the fixes are completely different, and optimizing the wrong one changes nothing.&lt;/p&gt;

&lt;p&gt;GameOptim GOT Online's Mali GPU Counter module now reports both. &lt;strong&gt;GPU primitives&lt;/strong&gt; data shows how many triangles reach the GPU and how many survive culling, which separates "the scene genuinely has too much geometry" from "the scene submits geometry it then throws away." &lt;strong&gt;GPU Shader Cycles&lt;/strong&gt; is now broken into four sub-counters, so you can see whether math, interpolation, register access, or texture work dominates. This article explains how to read both, and the 50% rule that turns primitive counts into a concrete diagnosis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GPU pressure has two main measurable sources: &lt;strong&gt;submitted primitives&lt;/strong&gt; and &lt;strong&gt;shader complexity&lt;/strong&gt;. Each now has its own counter in the Mali GPU Counter module.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Total primitives&lt;/strong&gt; is roughly equal to the engine-side rendered face count; &lt;strong&gt;visible primitives&lt;/strong&gt; are the triangles that survive frustum and backface culling on the GPU.&lt;/li&gt;
&lt;li&gt;In a 3D scene the visible ratio should be near or above &lt;strong&gt;50%&lt;/strong&gt;, because for most models about half the triangles are culled by facing direction. A much lower ratio at certain camera angles indicates large-area models (terrain, big buildings) that were never split.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shader Cycles&lt;/strong&gt; splits into &lt;strong&gt;Arithmetic&lt;/strong&gt;, &lt;strong&gt;Interpolator&lt;/strong&gt;, &lt;strong&gt;LoadStore&lt;/strong&gt;, and &lt;strong&gt;Texture&lt;/strong&gt; — the dominant category tells you which shader work is the bottleneck.&lt;/li&gt;
&lt;li&gt;Excessive primitive submission costs bandwidth and power even when the triangles are culled — culling should happen on the CPU side before submission.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is the Core Problem?
&lt;/h2&gt;

&lt;p&gt;Rendered faces are one of the primary sources of GPU pressure. The Triangle metric in Overview mode already shows which scenes carry the most rendered faces, but it cannot tell you why the count is high. High face counts come from two very different situations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Models are genuinely complex.&lt;/strong&gt; Dense character or prop meshes push the face count up wherever they appear.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Large-area models were never split.&lt;/strong&gt; Terrain and big buildings can have few faces inside the view frustum while still submitting a huge number of faces to the GPU, because the whole mesh is submitted before per-triangle culling runs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Situation 1 is well understood; situation 2 is easy to miss, because the visible scene looks sparse while the GPU still processes everything. The new GPU primitives data exists to expose exactly this case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do Invisible Triangles Still Cost the GPU Time?
&lt;/h2&gt;

&lt;p&gt;Culling happens &lt;strong&gt;after&lt;/strong&gt; submission. The engine hands the GPU a batch of primitives; the GPU then discards triangles outside the view frustum and triangles facing away from the camera. The discarded triangles cost bandwidth and power during submission and processing, even though they never produce pixels.&lt;/p&gt;

&lt;p&gt;This is why the primitive counters distinguish two numbers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Counter&lt;/th&gt;
&lt;th&gt;Definition&lt;/th&gt;
&lt;th&gt;What it tells you&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Total primitives&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;All primitives submitted to the GPU; basically equal to the engine-side rendered face count&lt;/td&gt;
&lt;td&gt;Whether the scene's overall face budget is reasonable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Visible primitives&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Triangles remaining after GPU-side culling that actually participate in rendering&lt;/td&gt;
&lt;td&gt;How much of the submission was wasted&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Visible primitives exclude triangles culled for being outside the view frustum and triangles culled by facing direction. The gap between total and visible is work the GPU did for nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Tell Whether Triangle Submission Is the Problem?
&lt;/h2&gt;

&lt;p&gt;Use the visible-to-total ratio, and read it per camera angle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ratio near or above 50%&lt;/strong&gt; is the expected case in a 3D scene — for most models, roughly half the triangles are backface-culled. The geometry budget is behaving normally.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ratio very low at specific camera angles&lt;/strong&gt; is the diagnostic signal for unsplit large-area models. When terrain or a large building dominates the submission but most of it gets culled, the visible ratio collapses at the angles where that mesh fills the submission.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you find such an angle, inspect the large-area models submitted to the GPU at that angle — those are the concrete optimization targets.&lt;/p&gt;

&lt;p&gt;Two supporting readings strengthen the diagnosis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total primitives&lt;/strong&gt; lets you sanity-check the engine's rendered face count from the GPU side and judge whether the budget itself is reasonable.&lt;/li&gt;
&lt;li&gt;Excessive primitive processing also loads &lt;strong&gt;bandwidth and power&lt;/strong&gt;, so a submission problem can show up as heat and battery drain before it shows up as frame time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Which Shader Unit Is the Bottleneck?
&lt;/h2&gt;

&lt;p&gt;High shader complexity is one of the main causes of GPU pressure, and some content is especially prone to it: &lt;strong&gt;post-processing, large terrain, water, character models, and particle effects&lt;/strong&gt;. The Shader Cycles counter shows the cycles the GPU spends on shader processing overall — but the total alone does not tell you what to change.&lt;/p&gt;

&lt;p&gt;The four sub-counters split that total by work type:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Sub-counter&lt;/th&gt;
&lt;th&gt;What it covers&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Shader Arithmetic Cycles&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Math computation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Shader Interpolator Cycles&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Vertex-to-pixel interpolation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Shader LoadStore Cycles&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Register reads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Shader Texture Cycles&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Texture processing&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Reading the breakdown converts "the shaders are expensive" into "the expense is concentrated in X." In a high-complexity scene, whichever category dominates is the unit to investigate — a shader-heavy scene dominated by texture cycles needs different attention than one dominated by arithmetic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should You Check First?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open the Triangle metric and shortlist scenes with high rendered-face counts.&lt;/strong&gt; This narrows where to look before reading any GPU counter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check total versus visible primitives in those scenes.&lt;/strong&gt; A healthy ratio sits near or above 50%; a collapsed ratio at specific angles points at unsplit large-area models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Identify the angle and the model.&lt;/strong&gt; If the ratio is low, find which terrain or building mesh dominates submission at that camera angle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open the Shader Cycles breakdown for the same scenes.&lt;/strong&gt; Compare Arithmetic, Interpolator, LoadStore, and Texture to find the dominant unit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlate with content type.&lt;/strong&gt; Post-processing, terrain, water, characters, and particles are the usual sources of high shader complexity — check whether the dominant cycle category matches the content in the scene.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-measure after changes with the same counters&lt;/strong&gt;, since both primitive ratio and cycle breakdown respond to specific fixes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Should You Optimize?
&lt;/h2&gt;

&lt;p&gt;Match the fix to the diagnosis:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Genuinely complex models&lt;/strong&gt; → apply &lt;strong&gt;LOD or HLOD&lt;/strong&gt; to simplify distant versions without visibly hurting quality. This is the standard lever for situation 1.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unsplit large-area models&lt;/strong&gt; → split terrain and large buildings so that submission aligns with what the view frustum can actually contain. This is the fix for situation 2, and the visible-ratio collapse is what identifies it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Excessive submission overall&lt;/strong&gt; → complete culling on the &lt;strong&gt;CPU side&lt;/strong&gt; and reduce the primitive count sent to the GPU, because culled triangles still cost bandwidth and power.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shader complexity&lt;/strong&gt; → use the dominant cycle category to target the investigation: arithmetic-heavy shaders need math reduction, texture-dominated shaders point at texture-heavy shading, and so on. The breakdown narrows where to look; it does not replace reading the shader itself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory that is not resources or Mono&lt;/strong&gt; → if Unity memory runs high while mainstream resources and Mono both look normal, check &lt;strong&gt;AssetBundle resident memory&lt;/strong&gt; in Overview's Resource mode. When residency is large, adjusting the caching strategy to reduce resident bundles lowers Unity memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Should You Avoid?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do not judge the geometry budget by visible primitives alone.&lt;/strong&gt; Total submission drives bandwidth and power; a scene can look cheap on visible triangles while wasting both on culled ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not read a low visible ratio as overdraw.&lt;/strong&gt; It is the opposite failure: too much submitted geometry that gets culled. The fix is model splitting or CPU-side culling, not pixel-cost reduction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not apply LOD where splitting is the real fix.&lt;/strong&gt; LOD simplifies distant complex models; it does not stop a single huge terrain mesh from being submitted whole.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not treat total Shader Cycles as an action item.&lt;/strong&gt; Without the four-way breakdown you cannot tell which unit to work on.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not chase shader fixes when the pressure is primitive-driven.&lt;/strong&gt; Shader cost and primitive cost are independent; confirm which counter is elevated before editing either.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Recommendations
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;What to inspect&lt;/th&gt;
&lt;th&gt;How to judge&lt;/th&gt;
&lt;th&gt;What to change&lt;/th&gt;
&lt;th&gt;What to re-measure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Face count high in some scenes&lt;/td&gt;
&lt;td&gt;Total vs visible primitives&lt;/td&gt;
&lt;td&gt;Ratio far below 50% at specific angles&lt;/td&gt;
&lt;td&gt;Split the large-area model submitted at those angles&lt;/td&gt;
&lt;td&gt;Visible ratio at the same angles&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dense models everywhere&lt;/td&gt;
&lt;td&gt;Triangle metric + total primitives&lt;/td&gt;
&lt;td&gt;Total primitives high, ratio near 50%&lt;/td&gt;
&lt;td&gt;LOD/HLOD for distant versions&lt;/td&gt;
&lt;td&gt;Total primitives per scene&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPU hot or draining fast&lt;/td&gt;
&lt;td&gt;Total primitives + bandwidth/power signals&lt;/td&gt;
&lt;td&gt;High submission with heavy culling&lt;/td&gt;
&lt;td&gt;CPU-side culling before submission&lt;/td&gt;
&lt;td&gt;Total primitives and thermal data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Shader cost dominates&lt;/td&gt;
&lt;td&gt;Four Shader Cycle categories&lt;/td&gt;
&lt;td&gt;One category clearly dominates&lt;/td&gt;
&lt;td&gt;Target that unit's shading work&lt;/td&gt;
&lt;td&gt;Shader Cycles breakdown&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unity memory high, resources and Mono normal&lt;/td&gt;
&lt;td&gt;AssetBundle resident info (Resource mode)&lt;/td&gt;
&lt;td&gt;Resident bundles large&lt;/td&gt;
&lt;td&gt;Adjust caching strategy&lt;/td&gt;
&lt;td&gt;Unity memory and resident count&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What Else Did This Update Change?
&lt;/h2&gt;

&lt;p&gt;Three smaller refinements round out the release:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Temperature display.&lt;/strong&gt; The hardware info section of Overview mode now shows &lt;strong&gt;CPU temperature, GPU temperature, and battery temperature&lt;/strong&gt;, which helps locate why a device is heating up — useful when you need to confirm that GPU pressure is showing up as real heat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeline thread names.&lt;/strong&gt; Timeline now labels threads such as the main thread and rendering thread, so multi-thread analysis no longer requires guessing which row is which.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AssetBundle resident info.&lt;/strong&gt; Covered above: it closes the diagnostic gap when Unity memory is high but neither mainstream resources nor Mono explain it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Total primitives ≈ engine-side rendered face count; visible primitives = triangles surviving frustum and backface culling.&lt;/strong&gt; The gap between them is wasted GPU work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A visible ratio near or above 50% is expected&lt;/strong&gt; in 3D scenes; a much lower ratio at specific angles identifies unsplit terrain or large buildings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Culling belongs on the CPU side&lt;/strong&gt;, because submitted-but-culled triangles still cost bandwidth and power.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shader Cycles breaks into Arithmetic, Interpolator, LoadStore, and Texture&lt;/strong&gt; — the dominant category is the shader bottleneck to investigate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AssetBundle resident memory&lt;/strong&gt; explains Unity memory growth that resources and Mono do not.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between total primitives and visible primitives?&lt;/strong&gt;&lt;br&gt;
Total primitives are everything submitted to the GPU, roughly equal to the engine's rendered face count. Visible primitives are the triangles left after GPU-side frustum and backface culling that actually render.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is a 50% visible ratio considered normal?&lt;/strong&gt;&lt;br&gt;
For most models, about half the triangles face away from the camera and are culled by facing direction. In a 3D scene the visible count therefore lands near or above half the submitted count when geometry is well organized.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My scene looks empty but the GPU is busy. What does that mean?&lt;/strong&gt;&lt;br&gt;
Check the visible-to-total primitive ratio. A very low ratio at certain angles means large-area models such as terrain or buildings are being submitted whole and then mostly culled — split those models rather than optimizing pixels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the four Shader Cycle categories?&lt;/strong&gt;&lt;br&gt;
Arithmetic Cycles cover math computation, Interpolator Cycles cover vertex-to-pixel interpolation, LoadStore Cycles cover register reads, and Texture Cycles cover texture processing. The dominant one identifies which shader work is the bottleneck.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unity memory is high, but resources and Mono look normal. What should I check?&lt;/strong&gt;&lt;br&gt;
Look at AssetBundle resident memory in Overview's Resource mode. If residency is large, optimizing the caching strategy to reduce resident bundles will lower Unity memory.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>gpu</category>
      <category>shader</category>
    </item>
    <item>
      <title>How Do You Tell Whether a Unity Stutter Is From GPU Shader Cost, Bandwidth, or Thread Blocking?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Fri, 06 Nov 2026 02:05:52 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-do-you-tell-whether-a-unity-stutter-is-from-gpu-shader-cost-bandwidth-or-thread-blocking-503l</link>
      <guid>https://dev.to/gameoptim/how-do-you-tell-whether-a-unity-stutter-is-from-gpu-shader-cost-bandwidth-or-thread-blocking-503l</guid>
      <description>&lt;p&gt;&lt;strong&gt;Cycles/Pixel, GPU bandwidth, and a thread timeline read the same frame drop from three angles — so you optimize the right subsystem instead of guessing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A dropped frame in a modern Unity game rarely has a single cause. Higher-fidelity art pushes Shader cost up, more textures increase GPU memory bandwidth, and heavier logic spreads work across threads. A stutter can come from any of these, and optimizing the wrong one yields no frame-time improvement at all.&lt;/p&gt;

&lt;p&gt;GameOptim GOT Online's Overview mode adds two diagnostics that read the same frame from different angles: &lt;strong&gt;GPU Counter&lt;/strong&gt; for shader cost and memory bandwidth, and &lt;strong&gt;Timeline&lt;/strong&gt; for thread-level activity during a stutter. This article explains what each measures, how to read them, and how to decide which one your stutter belongs to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A frame drop can come from &lt;strong&gt;GPU shader cost&lt;/strong&gt;, &lt;strong&gt;GPU memory bandwidth&lt;/strong&gt;, or &lt;strong&gt;thread blocking&lt;/strong&gt; — each needs a different fix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cycles/Pixel&lt;/strong&gt; measures the average GPU clock cycles spent per pixel. High values usually mean the Shader is too complex; low values with a stutter point elsewhere.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPU bandwidth&lt;/strong&gt; measures per-frame read/write volume. Sustained high external read/write causes fast battery drain and is independent of shader complexity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeline&lt;/strong&gt; visualizes up to 5 threads with parent and child function durations, so you can see thread count, queueing, idle states, and inter-thread waits during the exact stutter frame.&lt;/li&gt;
&lt;li&gt;GPU Counter data is currently available on devices with supported &lt;strong&gt;Mali&lt;/strong&gt; chips; check device compatibility before reading absence as a finding.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Does "GPU Is Slow" Actually Mean?
&lt;/h2&gt;

&lt;p&gt;"GPU pressure" is three separate things bundled into one complaint. Each has a different symptom and a different fix.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Subsystem&lt;/th&gt;
&lt;th&gt;What it measures&lt;/th&gt;
&lt;th&gt;Symptom when overloaded&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Cycles/Pixel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Average GPU clock cycles per pixel&lt;/td&gt;
&lt;td&gt;Shader complexity exceeds per-pixel budget; frame time grows with screen complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;GPU bandwidth&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Per-frame total read/write volume&lt;/td&gt;
&lt;td&gt;Sustained high load → fast battery drain, thermal throttling, eventual stutter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Thread timeline&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Activity across CPU threads during a frame&lt;/td&gt;
&lt;td&gt;Threads idle, queued, or waiting on each other; stutter caused by blocking, not raw compute&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are independent. A game can have low Cycles/Pixel and still drop frames because threads are blocking. A game can have expensive shaders and a clean timeline. The new GOT Online features let you read each separately so you do not optimize one to fix the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cycles/Pixel: Reading Shader Complexity
&lt;/h2&gt;

&lt;p&gt;Cycles/Pixel is the average number of GPU clock cycles consumed per rendered pixel. Shader complexity is the dominant factor: when a scene's shaders are complex, the GPU spends many cycles per pixel evaluating them, GPU time rises, and the frame stutters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to read it:&lt;/strong&gt; Use Cycles/Pixel under GPU shading to identify scenes with high cycle counts, then judge whether the scene's GPU pressure is caused by shader complexity. If the cycles value is high and tracks with shader-heavy scenes, shader simplification is the right lever. If the cycles value is low but the frame still stutters, shader cost is not the cause — look at bandwidth or the thread timeline instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Cycles/Pixel does not tell you:&lt;/strong&gt; It cannot distinguish between a few very expensive pixels and many moderately expensive ones, and it says nothing about memory traffic. Pair it with bandwidth data before deciding.&lt;/p&gt;

&lt;h2&gt;
  
  
  GPU Bandwidth: Reading Memory Traffic
&lt;/h2&gt;

&lt;p&gt;GPU bandwidth, like CPU bandwidth, is a major contributor to chip power consumption. When the GPU performs sustained high-load external read/write operations, power draw rises sharply.&lt;/p&gt;

&lt;p&gt;The GPU bandwidth module in GOT Online reports the &lt;strong&gt;total per-frame read/write bandwidth&lt;/strong&gt; across the test. Use it to locate scenes where bandwidth is high, identify what is driving the traffic, and run a follow-up test after any changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to read it:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A scene with high bandwidth but normal Cycles/Pixel points at memory traffic — texture streaming, render-target copies, or excessive buffer uploads — rather than shader compute.&lt;/li&gt;
&lt;li&gt;A scene with both high bandwidth and high cycles confirms a GPU-heavy scene that needs work on both fronts.&lt;/li&gt;
&lt;li&gt;Bandwidth is also a thermal signal: sustained high values lead to throttling and stutter even when raw frame time looks acceptable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Timeline: Reading Thread Activity During a Stutter
&lt;/h2&gt;

&lt;p&gt;Overview mode already supported stutter analysis through call-stacks. The new Timeline module adds a time-ordered view so the sequence of events is visible at a glance.&lt;/p&gt;

&lt;p&gt;Timeline shows the main thread and up to 4 sub-threads (5 total). Under each thread, both parent and child functions are visible, and the length of each function's time bar represents its duration — the longer the bar, the more time that function consumed near that frame.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What the Timeline answers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many threads were active during the stutter frame.&lt;/li&gt;
&lt;li&gt;What each thread was executing and for how long.&lt;/li&gt;
&lt;li&gt;Whether threads were queued behind one another.&lt;/li&gt;
&lt;li&gt;Whether any thread was idle or waiting on another thread to finish.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes thread-level bottlenecks visible in a way a call-stack cannot. A call-stack tells you what one function did; a Timeline tells you whether another thread was the actual reason the frame did not complete on time.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Tell Which Subsystem Is Causing the Stutter?
&lt;/h2&gt;

&lt;p&gt;Work through the three signals in this order:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If you see&lt;/th&gt;
&lt;th&gt;The cause is likely&lt;/th&gt;
&lt;th&gt;What to optimize&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cycles/Pixel high, bandwidth low, timeline clean&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Shader complexity&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reduce shader cost, simplify passes, optimize per-pixel work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bandwidth high, cycles normal, timeline clean&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Memory traffic&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reduce texture streaming, render-target copies, buffer uploads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cycles and bandwidth normal, timeline shows idle/waiting threads&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Thread blocking&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Re-order work, remove unnecessary waits, balance load across threads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cycles high and bandwidth high&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Combined GPU load&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Address both, starting with whichever has the larger headroom gap&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A stutter that matches none of these rows may be CPU-side logic or input handling — the new modules do not cover that, and you should check the existing stutter call-stacks instead.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should You Check First?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Confirm device compatibility.&lt;/strong&gt; GPU Counter data requires a supported Mali chip. If Cycles/Pixel and bandwidth are absent, it is a device limitation, not a zero reading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start with the stutter frame.&lt;/strong&gt; Open Timeline and look at the exact frame that dropped. Thread activity at that moment tells you whether the problem is compute, memory, or blocking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read Cycles/Pixel next.&lt;/strong&gt; If the dropped frame also has high cycles, shader cost is involved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read bandwidth for the same frame.&lt;/strong&gt; If bandwidth spiked too, memory traffic is part of the cause.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Correlate across the test.&lt;/strong&gt; A one-frame spike is different from a scene-wide trend. Check whether the high values persist through the scene or appear only in one frame.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Should You Avoid?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do not treat a missing GPU Counter reading as zero.&lt;/strong&gt; On unsupported devices the data is simply unavailable. Verify chip support first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not optimize shaders when the timeline shows thread waiting.&lt;/strong&gt; Shader work has no effect on a CPU-side thread-blocking stutter.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not reduce bandwidth if the cycles value is the real driver.&lt;/strong&gt; Cutting texture resolution will not lower Cycles/Pixel if the shader itself is the cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not read a single frame in isolation.&lt;/strong&gt; Confirm the signal holds across the scene before making changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GPU pressure splits into &lt;strong&gt;Cycles/Pixel&lt;/strong&gt; (shader cost), &lt;strong&gt;bandwidth&lt;/strong&gt; (memory traffic), and &lt;strong&gt;thread blocking&lt;/strong&gt; (timeline) — independent signals requiring different fixes.&lt;/li&gt;
&lt;li&gt;High &lt;strong&gt;Cycles/Pixel&lt;/strong&gt; means shaders are doing too much per pixel. Low cycles with a stutter means the cause is elsewhere.&lt;/li&gt;
&lt;li&gt;High &lt;strong&gt;bandwidth&lt;/strong&gt; drives power draw and thermal throttling, even when frame time looks fine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeline&lt;/strong&gt; reveals thread count, queueing, idle states, and inter-thread waits — the only way to see a blocking bottleneck.&lt;/li&gt;
&lt;li&gt;GPU Counter is available on supported &lt;strong&gt;Mali&lt;/strong&gt; devices; absence is a compatibility note, not a zero.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why is my Cycles/Pixel high but my game looks fine?&lt;/strong&gt;&lt;br&gt;
Cycles/Pixel measures shader cost per pixel, not visual quality. High values mean the GPU spends many cycles evaluating shaders, which can cause stutter even if the output looks correct. Simplify shaders or reduce overdraw to bring it down.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does high GPU bandwidth cause stuttering directly?&lt;/strong&gt;&lt;br&gt;
Not always immediately. Sustained high bandwidth raises power draw and temperature, which leads to thermal throttling and eventual stutter. It also competes with other memory traffic, so spikes can coincide with frame drops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How many threads does the Timeline show?&lt;/strong&gt;&lt;br&gt;
Up to 5 — the main thread plus 4 sub-threads. Within each thread, both parent and child functions are shown with duration bars.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does an idle thread in the Timeline mean?&lt;/strong&gt;&lt;br&gt;
A thread that is idle or waiting for another thread to finish means the stutter is likely a blocking issue, not a compute shortage. Re-ordering work or removing the wait is more effective than adding more CPU tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;My device does not show GPU Counter data. Is that a bug?&lt;/strong&gt;&lt;br&gt;
GPU Counter currently supports devices with certain Mali chips. If the data is absent, verify that your device uses a supported chip; otherwise the reading is simply unavailable, not zero.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gpu</category>
      <category>performance</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>How Do You Find the Lua Function That Is Actually Costing You Frame Time?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Wed, 04 Nov 2026 06:55:51 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-do-you-find-the-lua-function-that-is-actually-costing-you-frame-time-27mf</link>
      <guid>https://dev.to/gameoptim/how-do-you-find-the-lua-function-that-is-actually-costing-you-frame-time-27mf</guid>
      <description>&lt;p&gt;&lt;strong&gt;A Lua entry in the top-20 cost list is the start of the investigation, not the answer. Three stack views plus a reversed call tree point you at the leaf function worth fixing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Lua rarely shows up in a Unity performance report as one big number. It shows up as a handful of function names inside the logic-code cost ranking, and the expensive part is usually not the function listed there — it is a leaf several levels down its call stack.&lt;/p&gt;

&lt;p&gt;The practical workflow is short: open the GOT Online Lua report's &lt;strong&gt;Code Efficiency → CPU Time&lt;/strong&gt; page, choose the stack view that matches the question you are asking (whole-session, single-scene, or single-frame), then reverse the stack so the deepest and most expensive children surface first. This article walks through that sequence, explains the Lua function naming format the report uses, and covers the one test setting that silently breaks the whole analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Lua cost appears in reports as individual functions in the top-20 logic cost list, not as a single aggregate figure.&lt;/li&gt;
&lt;li&gt;The report offers three stack views: &lt;strong&gt;overall cost&lt;/strong&gt;, &lt;strong&gt;specified scene&lt;/strong&gt;, and &lt;strong&gt;any single frame&lt;/strong&gt;. Each answers a different question; using the wrong one sends you to the wrong function.&lt;/li&gt;
&lt;li&gt;Lua functions are identified as &lt;strong&gt;&lt;code&gt;X@Y:Z&lt;/code&gt;&lt;/strong&gt; — function name, defining file, defining line. When the name cannot be resolved, &lt;code&gt;X&lt;/code&gt; becomes &lt;code&gt;unknown&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;When Lua runs as &lt;strong&gt;bytecode&lt;/strong&gt;, the line number &lt;code&gt;Z&lt;/code&gt; is always &lt;code&gt;0&lt;/code&gt;. Test with Lua source if you want line-level attribution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse stack analysis&lt;/strong&gt; reorders the cost stack so deep sub-functions that actually consume the time appear on top, instead of forcing you to expand dozens of levels by hand.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is the Core Problem?
&lt;/h2&gt;

&lt;p&gt;When Lua usage grows in a commercial project, CPU cost spreads across many small functions rather than concentrating in one obviously slow place. In a report, that looks like several Lua functions mixed into the top-20 logic cost list — enough to know Lua is involved, not enough to know where to change code.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv5g4phis49rss0j30xaj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv5g4phis49rss0j30xaj.png" alt=" " width="799" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqveanjmt1ak184r160b9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqveanjmt1ak184r160b9.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cost hides for two reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The entry function is not the expensive function.&lt;/strong&gt; A Lua call often passes through wrappers, dispatch tables, and utility layers before reaching the function that does the work. The top-level name accumulates cost; the leaf generates it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Aggregate and peak are different measurements.&lt;/strong&gt; A function can dominate total session cost while never appearing in the frame where the game stuttered, and vice versa. Locating one does not locate the other.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why Does the Cost Hide in the Call Stack?
&lt;/h2&gt;

&lt;p&gt;A stack trace orders calls from the outermost caller to the innermost callee. Read top-down, the first entries are the ones you recognize — event handlers, update loops, framework entry points — and they carry the largest accumulated totals simply because everything below them rolls up into their number.&lt;/p&gt;

&lt;p&gt;The actual work sits at the bottom. To see it in the default view, you expand frame after frame, often dozens of levels deep, and the numbers you are comparing are already diluted by sibling branches. That is the structural reason a "Lua is slow" finding stalls: the report is correct, but the ordering hides the answer.&lt;/p&gt;

&lt;p&gt;Reversing the stack fixes the ordering. Instead of reading caller → callee, you read callee → caller, so the deepest sub-function with the highest self-cost lands at the top of the view. The bottleneck becomes visible without manual expansion.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Is a Lua Function Identified in the Report?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk69vd55i5zx5zen3s4is.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk69vd55i5zx5zen3s4is.png" alt=" " width="800" height="783"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every Lua entry carries a name in a fixed format that maps it back to source:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Part&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;X&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Function name&lt;/td&gt;
&lt;td&gt;Falls back to &lt;code&gt;unknown&lt;/code&gt; when it cannot be resolved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Y&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;File where the function is defined&lt;/td&gt;
&lt;td&gt;The script location, not the call site&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Z&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Line where the function is defined&lt;/td&gt;
&lt;td&gt;Always &lt;code&gt;0&lt;/code&gt; under bytecode execution&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;X@Y:Z&lt;/code&gt; is enough to search your codebase directly: file plus line lands you on the definition, and the function name confirms it. This is why the format matters more than the visual stack — it converts a profiler row into a code location.&lt;/p&gt;

&lt;p&gt;The bytecode caveat is the one that trips teams up. If the Lua scripts are shipped as bytecode, &lt;code&gt;Z&lt;/code&gt; is &lt;code&gt;0&lt;/code&gt; for everything, and you lose line-level attribution entirely. The recommendation is to run the test with Lua source wherever possible, so the stack data stays resolvable.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Tell Whether the Function Is Actually a Problem?
&lt;/h2&gt;

&lt;p&gt;Match the stack view to the question. Each view isolates a different kind of cost, and the answers do not transfer between them.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;View&lt;/th&gt;
&lt;th&gt;Question it answers&lt;/th&gt;
&lt;th&gt;Use it when&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Overall CPU cost stack&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which Lua functions accumulate the most cost across the whole session&lt;/td&gt;
&lt;td&gt;Building the hotspot shortlist at the start&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Specified-scene stack&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which Lua functions dominate in one particular scene&lt;/td&gt;
&lt;td&gt;Cost differs by scene, and you want to target one&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Single-frame cost stack&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Which Lua functions consumed time in the exact frame where cost peaked&lt;/td&gt;
&lt;td&gt;Explaining a specific spike or stutter&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Three signals confirm that a function is a genuine target rather than noise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It appears &lt;strong&gt;high in the reversed overall stack&lt;/strong&gt;, meaning its own cost is large rather than inherited from children.&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;reappears in the per-scene view&lt;/strong&gt; for the scene that carries the memory or frame-time pressure.&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;positions itself in the peak frame's stack&lt;/strong&gt;, so the aggregate number and the visible symptom agree.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a function only satisfies the first signal, you have found volume, not a bottleneck. If it only satisfies the third, you have found a one-off spike, not a pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should You Check First?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open the Code Efficiency → CPU Time page and confirm Lua entries exist.&lt;/strong&gt; If Lua does not appear in the top-20 logic cost list, this workflow has nothing to target yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Start with the overall stack to build a shortlist.&lt;/strong&gt; Do not optimize from this list; use it to pick candidates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse the stack before judging any candidate.&lt;/strong&gt; The entry with the biggest number in the default order is frequently the caller, not the cause.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Record the &lt;code&gt;X@Y:Z&lt;/code&gt; identifier for each candidate.&lt;/strong&gt; File and line are what make the finding actionable in code review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirm the test ran on source, not bytecode.&lt;/strong&gt; If every &lt;code&gt;Z&lt;/code&gt; is &lt;code&gt;0&lt;/code&gt;, fix the test setup before drawing conclusions — the data is coarse by construction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-check the candidate in the scene view and the peak-frame view.&lt;/strong&gt; A function that survives all three is a real target.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Should You Optimize?
&lt;/h2&gt;

&lt;p&gt;Optimize the leaf, then the path that reaches it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The leaf function itself&lt;/strong&gt; is where the self-cost sits. The reversed stack identifies it; the &lt;code&gt;X@Y:Z&lt;/code&gt; identifier locates it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The call frequency of that path&lt;/strong&gt; decides whether the total cost is a problem. The per-frame stack shows what one call costs; the aggregate stack shows how often it happens. A cheap function on a hot path costs more than an expensive function called twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The scene where it concentrates&lt;/strong&gt; tells you whether the fix is local (a scene-specific feature) or systemic (a shared utility used everywhere).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each change should be re-measured with the same view that produced the finding. A fix that lowers aggregate cost but leaves the peak-frame stack unchanged has moved volume without removing the spike.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should You Avoid?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do not optimize the top entry of the default stack.&lt;/strong&gt; It inherits cost from everything beneath it; changing it usually means changing design, not code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not profile bytecode builds and expect line numbers.&lt;/strong&gt; &lt;code&gt;Z = 0&lt;/code&gt; is a test configuration result, not a report bug.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not expand the stack by hand to find the bottom.&lt;/strong&gt; Toggle the reversed view instead; dozens of manual expansions is how bottlenecks get missed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not treat an aggregate hotspot as a frame-time problem without checking the peak frame.&lt;/strong&gt; Total cost and peak cost point at different code.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Recommendations
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Problem&lt;/th&gt;
&lt;th&gt;What to inspect&lt;/th&gt;
&lt;th&gt;How to judge&lt;/th&gt;
&lt;th&gt;What to change&lt;/th&gt;
&lt;th&gt;What to re-measure&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lua appears in the cost list but you cannot name the culprit&lt;/td&gt;
&lt;td&gt;Reversed overall stack&lt;/td&gt;
&lt;td&gt;Highest self-cost at the deepest level&lt;/td&gt;
&lt;td&gt;That leaf function&lt;/td&gt;
&lt;td&gt;Overall stack&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost is concentrated in one scene&lt;/td&gt;
&lt;td&gt;Specified-scene stack&lt;/td&gt;
&lt;td&gt;Same function tops the scene view&lt;/td&gt;
&lt;td&gt;Scene-scoped logic&lt;/td&gt;
&lt;td&gt;Scene view plus overall&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost peaks only in one frame&lt;/td&gt;
&lt;td&gt;Single-frame stack&lt;/td&gt;
&lt;td&gt;Function present in the peak frame&lt;/td&gt;
&lt;td&gt;The call path taken in that frame&lt;/td&gt;
&lt;td&gt;Peak-frame view&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Line numbers are all &lt;code&gt;0&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Test script delivery&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;Z&lt;/code&gt; equals &lt;code&gt;0&lt;/code&gt; across entries&lt;/td&gt;
&lt;td&gt;Run the test on Lua source&lt;/td&gt;
&lt;td&gt;Naming resolved to file and line&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A candidate looks large but changes nothing when tuned&lt;/td&gt;
&lt;td&gt;Peak-frame view&lt;/td&gt;
&lt;td&gt;Function absent from the spike frame&lt;/td&gt;
&lt;td&gt;Investigate the actual spike frame&lt;/td&gt;
&lt;td&gt;Stutter metric, not total cost&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Lua cost in a report is a list of functions, and the listed function is often the caller rather than the cause.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse stack analysis&lt;/strong&gt; surfaces the deep sub-function that actually holds the cost.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;X@Y:Z&lt;/code&gt; — name, file, line — is the bridge from a profiler row to a code location.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bytecode execution forces &lt;code&gt;Z&lt;/code&gt; to &lt;code&gt;0&lt;/code&gt;.&lt;/strong&gt; Test with source when line-level attribution matters.&lt;/li&gt;
&lt;li&gt;Overall, per-scene, and per-frame stacks answer different questions; a real bottleneck shows up in the ones that match your symptom.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What does the &lt;code&gt;X@Y:Z&lt;/code&gt; format in a Lua stack entry mean?&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;X&lt;/code&gt; is the function name, &lt;code&gt;Y&lt;/code&gt; is the file where the function is defined, and &lt;code&gt;Z&lt;/code&gt; is the line number of its definition. If the name cannot be resolved, &lt;code&gt;X&lt;/code&gt; becomes &lt;code&gt;unknown&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why is the line number always 0 in my Lua data?&lt;/strong&gt;&lt;br&gt;
Because the scripts are running as bytecode. Under bytecode execution the line value is always &lt;code&gt;0&lt;/code&gt;, so run the test with Lua source to get usable line-level attribution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I use the overall stack or the single-frame stack?&lt;/strong&gt;&lt;br&gt;
Use the overall stack to find which functions accumulate cost across the session, and the single-frame stack to explain a specific spike or stutter. A function can be large in total while never appearing in the frame you are investigating.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does reversing the stack make the bottleneck easier to find?&lt;/strong&gt;&lt;br&gt;
The default order lists callers above callees, so entry points carry inflated totals. Reversed, the deepest callee with the highest self-cost appears first, which removes the need to expand dozens of levels manually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is a function that tops the overall cost list necessarily the one to optimize?&lt;/strong&gt;&lt;br&gt;
Not necessarily. It may simply be a caller that aggregates everything beneath it. Confirm that the self-cost is high and that it also appears in the scene or peak-frame view before treating it as a target.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>lua</category>
      <category>performance</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>How Can You Tell Whether a Unity Crash Is From GPU Memory, Resource Footprint, or Mono Heap Retention?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Mon, 02 Nov 2026 08:02:58 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-can-you-tell-whether-a-unity-crash-is-from-gpu-memory-resource-footprint-or-mono-heap-1cgh</link>
      <guid>https://dev.to/gameoptim/how-can-you-tell-whether-a-unity-crash-is-from-gpu-memory-resource-footprint-or-mono-heap-1cgh</guid>
      <description>&lt;p&gt;&lt;strong&gt;One high memory number hides three different root causes. GameOptim GOT Online's new PSS GPU trend, per-resource snapshots, and IL2CPP heap dumps split that single signal into three diagnosable metrics — so you can fix the right subsystem instead of guessing.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Memory pressure crashes are one of the most common reasons a Unity build fails device certification or gets refunded on release. The frustrating part is that "memory is high" is almost never the whole story — GPU memory, general resource footprint, and Mono heap retention all contribute to the final OOM kill, and fixing the wrong one wastes days of iteration.&lt;/p&gt;

&lt;p&gt;GameOptim GOT Online's latest release adds three new diagnostics that let you read each subsystem separately, instead of guessing from a single total memory number. This article explains what each new metric actually measures, how to read it correctly, and the caveats you need to know before acting on the data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A single high memory value is useless unless you split it into &lt;strong&gt;PSS GPU memory&lt;/strong&gt;, &lt;strong&gt;resource memory&lt;/strong&gt;, and &lt;strong&gt;Mono Reserved&lt;/strong&gt; — each points to a different subsystem with a different root cause.&lt;/li&gt;
&lt;li&gt;PSS GPU memory, newly added to GOT Online's Overview mode, shows the rendering memory the graphics driver reports; Android 10 and 11 refresh this value only every 5 minutes, so the curve appears stepped.&lt;/li&gt;
&lt;li&gt;The new &lt;strong&gt;Memory Usage&lt;/strong&gt; page combines an overview table (PSS, Mono Reserved, resource, Lua heap) with per-resource breakdowns and frame-level snapshots marked on the time axis.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IL2CPP Mono heap snapshots&lt;/strong&gt; are now available without a separate Mono build, provided you build with Unity 2019.4+ and &lt;strong&gt;Script Debugging&lt;/strong&gt; enabled.&lt;/li&gt;
&lt;li&gt;Sampling strategy matters: manual resource snapshots capture every resource in a frame, while periodic snapshots and Resource-mode data have lower resolution by design to keep instrumentation overhead acceptable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Does "High Memory" Actually Mean in Unity?
&lt;/h2&gt;

&lt;p&gt;Unity games draw memory from three distinct pools, and each pool grows for different reasons. Fixing a Mono leak with asset compression, or vice versa, never works.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Subsystem&lt;/th&gt;
&lt;th&gt;What it measures&lt;/th&gt;
&lt;th&gt;Typical failure mode&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;PSS GPU Memory&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rendering memory reported by the graphics driver — textures, meshes, driver libraries&lt;/td&gt;
&lt;td&gt;OOM kills on Android when GPU memory spikes past the device threshold&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Resource Memory&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Total memory consumed by textures, meshes, animations, audio, and 7 other categories&lt;/td&gt;
&lt;td&gt;Scene transitions that push total resources past device limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mono Reserved&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Managed heap capacity held by the Mono runtime&lt;/td&gt;
&lt;td&gt;Slow growth over a session that eventually exhausts process memory&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These three pools are independent. A game with moderate PSS can still crash from GPU memory; a game with stable resource memory can still leak Mono references. The new GOT Online features let you inspect each one without running three separate test passes.&lt;/p&gt;

&lt;h2&gt;
  
  
  PSS GPU Memory: Reading the Driver's Number
&lt;/h2&gt;

&lt;p&gt;The new PSS GPU memory trend appears in the Overview mode's &lt;strong&gt;Runtime Info&lt;/strong&gt; page. GPU memory is the memory consumed by rendering resources at the driver level — texture data, mesh buffers, and memory allocated by the libraries that parse those resources. Unlike process PSS memory, this value is reported directly by the graphics driver rather than by the OS memory manager.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fabjopcof3zr97q9aa4x7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fabjopcof3zr97q9aa4x7.png" alt=" " width="799" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When GPU memory rises near the device limit, the kernel kills the process — so tracking this number is critical for crash-risk management alongside PSS memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important caveat for Android 10 and Android 11:&lt;/strong&gt; Due to platform-level restrictions, these OS versions refresh the GPU PSS value only once every 5 minutes after boot. On those devices the curve appears as a step function, and a large jump at frame N actually reflects changes that accumulated over the preceding 5 minutes. When GPU memory spikes appear in reports from Android 10/11, trace back through events in the prior 5-minute window before assigning blame to a single frame.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Memory Usage Page: One Table, Three Questions
&lt;/h2&gt;

&lt;p&gt;GOT Online's Overview mode now includes a &lt;strong&gt;Memory Usage&lt;/strong&gt; page that consolidates memory diagnostics previously scattered across separate reports. The page is organized into two layers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 1: The Overview Table
&lt;/h3&gt;

&lt;p&gt;The overview table plots &lt;strong&gt;PSS memory&lt;/strong&gt;, &lt;strong&gt;Reserved Mono&lt;/strong&gt;, and &lt;strong&gt;total resource memory&lt;/strong&gt; on one time axis. When Lua testing is enabled in Overview mode, Lua heap memory is added as a fourth curve. Resource memory here is the sum of all resource memory collected during the test.&lt;/p&gt;

&lt;p&gt;GameOptim SDK samples data at five points by default — test start, every 1,000 frames, scene transitions, test end, and manual resource snapshots via the &lt;strong&gt;Dump&lt;/strong&gt; operation. Only manual Dumps capture every resource in the current frame with full detail.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk3lyu4xq1dp9b2xq97mq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fk3lyu4xq1dp9b2xq97mq.png" alt=" " width="533" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The default view shows three curves — &lt;strong&gt;PSS memory&lt;/strong&gt;, &lt;strong&gt;Reserved Mono&lt;/strong&gt;, and &lt;strong&gt;total resource memory&lt;/strong&gt; — with all resource-object snapshot frames marked on the horizontal axis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhyvmdyowfz3ckg3iico9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhyvmdyowfz3ckg3iico9.png" alt=" " width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resource-mode caveat:&lt;/strong&gt; When Resource mode is enabled alongside Overview mode, the SDK collects detailed per-resource data. To keep instrumentation overhead acceptable, different resource categories are sampled on different frames. The resulting total resource memory is a simulated sum with a 60-frame step — lower accuracy, and hidden by default in the table.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance caveat:&lt;/strong&gt; Running Overview mode with Resource mode enabled introduces measurable overhead (lower frame rate, stutter during collection). Do not use this combination for general gameplay performance analysis — it's specifically for resource memory diagnosis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 2: Per-Resource Breakdown and Snapshots
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;Resource Memory Usage&lt;/strong&gt; table breaks resource memory into 11 categories: textures, meshes, animations, audio, and seven others. Each category gets its own trend line so you can see exactly which resource type is driving total memory pressure in each scene, and quickly judge which resource type is responsible for memory pressure in each scene.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo59ixck85aqw6ga3f62l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fo59ixck85aqw6ga3f62l.png" alt=" " width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Selecting a resource snapshot frame (in non-Resource mode) or any frame (in Resource mode) generates two artifacts below the table: a pie-chart preview showing resource-type memory share at that frame, and the corresponding resource detail data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbziaw4zt6slomzzudgsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbziaw4zt6slomzzudgsv.png" alt=" " width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The resource-object snapshot module does two things at once: it shows the memory-share pie chart of each resource type at the selected frame, and lists every resource type in a table sorted by memory usage (largest first). For each type the table shows the quantity, memory usage, and a recommended-value flag — items exceeding the recommended value are highlighted in red so you can immediately locate categories that need attention.&lt;/p&gt;

&lt;p&gt;Clicking the operation column in the table jumps directly to the corresponding tab in the Resource Memory page for deeper analysis. In the Resource Memory page, resource-object snapshot frames are also marked, so selecting any snapshot frame pulls up the detailed resource information for that moment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feyozs137zntlq0w9u15w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Feyozs137zntlq0w9u15w.png" alt=" " width="800" height="269"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Memory Usage page also supports &lt;strong&gt;comparison mode&lt;/strong&gt;: toggle it on from the bottom right, select any two snapshot frames (non-Resource mode) or any two frames (Resource mode), and the page shows the per-resource memory delta between them — quantity and size for every resource type.&lt;/p&gt;

&lt;h2&gt;
  
  
  IL2CPP Mono Heap Snapshots: No Separate Mono Build Required
&lt;/h2&gt;

&lt;p&gt;For managed memory analysis, GOT Online adds two new pages under &lt;strong&gt;Heap Leak Analysis&lt;/strong&gt;: &lt;strong&gt;Resident Heap Allocation Functions&lt;/strong&gt; and &lt;strong&gt;Heap Object Snapshot&lt;/strong&gt;. These sit alongside the existing IL2CPP Mono heap allocation data collection, which requires Unity 2019.4 or later with &lt;strong&gt;Script Debugging&lt;/strong&gt; enabled at build time.&lt;/p&gt;

&lt;p&gt;Dump rules are configured before the test run — snapshots are collected either at a fixed frame interval or on manual trigger.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reading the Heap Object Snapshot
&lt;/h3&gt;

&lt;p&gt;Developers can use the bar chart in the &lt;strong&gt;Heap Object Snapshot&lt;/strong&gt; page to quickly identify which scenes retain heap memory worth optimizing. The chart supports two dimensions — &lt;strong&gt;heap object size&lt;/strong&gt; and &lt;strong&gt;heap object count&lt;/strong&gt; — so you can see whether retention comes from a small number of large objects or a large number of small ones.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx7z1copa5st2svpg9lro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx7z1copa5st2svpg9lro.png" alt=" " width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Heap objects split into two parts: &lt;strong&gt;Managed Objects&lt;/strong&gt; and &lt;strong&gt;memory fragmentation&lt;/strong&gt;. Fragmentation itself splits further into &lt;strong&gt;free active memory&lt;/strong&gt; (used first during allocation) and &lt;strong&gt;free fragment memory&lt;/strong&gt; (used only when active memory is insufficient). Allocation always consumes from free active memory before falling back to fragments.&lt;/p&gt;

&lt;p&gt;Below the bar chart, the page shows summary stats for the selected frame: total Managed Object size, total type count, total object count, and fragmentation ratio. On the right, a pie chart shows the share of the top 10 object types by memory usage, with the remainder grouped as "other" — giving you an immediate view of where Mono memory is concentrated so you can lock in on the bottleneck.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp1klxa5810cth8gbx82a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp1klxa5810cth8gbx82a.png" alt=" " width="800" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below the pie chart sits the object-type table, which lists every object type in the selected frame along with its size, share, and object count. Expanding any object type reveals every function that allocated that type, and the inverse call path from those functions upward to your code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft15z9dwuxzd1es1xrbdi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft15z9dwuxzd1es1xrbdi.png" alt=" " width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the critical diagnostic step: the call path tells you exactly where in your code the allocation originates, so you can search for the sub-function and fix the source rather than masking the symptom.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sampling Caveats That Change How You Read the Data
&lt;/h2&gt;

&lt;p&gt;Three properties of GameOptim's sampling strategy are easy to overlook but directly affect what the data means:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Resource-mode step size.&lt;/strong&gt; Detailed per-resource data is collected every 60 frames, not every frame. The simulated total curve has deliberate gaps. Do not treat a frame-to-frame dip in the simulated curve as evidence that memory was released.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dump triggers.&lt;/strong&gt; Only manual &lt;strong&gt;Dump&lt;/strong&gt; operations capture every resource in the frame. Periodic samples (start, every 1,000 frames, scene transitions, end) are partial snapshots. If you need a complete view of resource state at a specific moment, trigger a manual Dump.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android 10/11 GPU PSS refresh.&lt;/strong&gt; As noted above, GPU PSS values on these devices update every 5 minutes. A spike at frame N is not necessarily caused by an event at frame N.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PSS GPU memory, resource memory, and Mono Reserved are three independent signals.&lt;/strong&gt; Each one points to a different subsystem; no single number can diagnose a crash.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android 10/11 users&lt;/strong&gt; must account for the 5-minute GPU PSS refresh rate when reading GPU memory spikes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IL2CPP Mono analysis&lt;/strong&gt; now works from GOT Online — no separate Mono build needed, provided you build with Script Debugging enabled in Unity 2019.4+.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manual Dump captures every resource&lt;/strong&gt;; periodic samples do not. Use manual Dumps when you need a complete frame-level picture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource mode + Overview mode&lt;/strong&gt; has meaningful performance overhead. Use it for resource diagnosis only, not for general gameplay performance measurement.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Why does my Android 11 report show a single frame where GPU memory jumps by 200 MB?&lt;/strong&gt;&lt;br&gt;
Android 10 and 11 refresh the GPU PSS value only once every 5 minutes. The jump reflects changes accumulated over the preceding 5 minutes, not a single frame's workload.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I still need to build a separate Mono build to analyze heap retention?&lt;/strong&gt;&lt;br&gt;
No. On GOT Online, IL2CPP builds support Mono heap allocation data collection and snapshots, provided you build with Unity 2019.4 or later and have &lt;strong&gt;Script Debugging&lt;/strong&gt; enabled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The total resource memory in my Resource-mode test looks lower than I expected. Is the report wrong?&lt;/strong&gt;&lt;br&gt;
When Resource mode is enabled alongside Overview mode, total resource memory is a simulated sum with a 60-frame step and lower accuracy. It is hidden by default for this reason.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How do I compare memory usage between two scenes?&lt;/strong&gt;&lt;br&gt;
Use the comparison mode in the Resource Memory Usage table. Open comparison mode from the bottom right, select two snapshot frames, and the page shows the per-resource memory delta between them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I always run with Resource mode enabled to get better data?&lt;/strong&gt;&lt;br&gt;
Resource mode introduces significant overhead (lower frame rate, stutter). Enable it only when you specifically need per-resource breakdowns; for general crash-risk assessment, Overview mode with the new PSS GPU and Mono data is sufficient.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>crash</category>
      <category>resources</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>How Large Should a Unity Mono Heap Be Before You Treat It as a Problem?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Fri, 30 Oct 2026 10:49:26 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-large-should-a-unity-mono-heap-be-before-you-treat-it-as-a-problem-ja0</link>
      <guid>https://dev.to/gameoptim/how-large-should-a-unity-mono-heap-be-before-you-treat-it-as-a-problem-ja0</guid>
      <description>&lt;p&gt;&lt;strong&gt;Heap size on its own is a weak signal. Check Reserved versus Used, whether allocation keeps growing across a session, and whether GC stutter frames line up with your allocation pattern — before you change any code.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A large Mono heap in a Unity game is not automatically a leak, and it is not automatically worth optimizing. The heap number tells you how much memory the managed runtime has reserved. Whether that number is a problem depends on three separate facts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How much of the heap is actually holding live data (&lt;strong&gt;Mono Used&lt;/strong&gt;) versus merely reserved (&lt;strong&gt;Mono Reserved&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;Whether the value keeps growing across a session, or settles after the first scene.&lt;/li&gt;
&lt;li&gt;Whether managed allocation is producing GC stutter frames during normal gameplay.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;GameOptim's guidance treats a Mono heap above roughly &lt;strong&gt;80 MB&lt;/strong&gt; as a reason to collect Mono data in depth — not as a verdict that the project is leaking. The rest of this article explains how to separate those cases, what to inspect first, and which optimizations are actually worth doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A high Mono heap value is a triage signal, not proof of a leak.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reserved&lt;/strong&gt; and &lt;strong&gt;Used&lt;/strong&gt; answer different questions: how much capacity the runtime holds, and how much of it is live. Read them together, never the larger one alone.&lt;/li&gt;
&lt;li&gt;Continuous managed allocation causes both memory growth and &lt;strong&gt;GC stutter&lt;/strong&gt;; forced collections such as &lt;code&gt;GC.Collect&lt;/code&gt; and &lt;code&gt;UnloadUnused&lt;/code&gt; show up as recurring stutter points in profile data.&lt;/li&gt;
&lt;li&gt;Lua objects that hold references to Mono objects can keep managed memory alive, so a Lua-side reference graph can look exactly like a Mono leak.&lt;/li&gt;
&lt;li&gt;On IL2CPP, Mono heap data can be collected with SDK 2.4.5 or later and &lt;strong&gt;Script Debugging&lt;/strong&gt; enabled, so producing a separate Mono build is no longer a prerequisite for this analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is the Core Problem?
&lt;/h2&gt;

&lt;p&gt;Unity's Mono heap is the managed memory area used by C# objects, strings, and the runtime's own bookkeeping. Teams usually arrive at this question after seeing one of two symptoms: the heap value in a report looks large, or the game stutters at intervals that no rendering change seems to fix.&lt;/p&gt;

&lt;p&gt;These are different problems wearing the same number:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Concept&lt;/th&gt;
&lt;th&gt;What it describes&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mono Reserved&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The heap capacity the runtime holds&lt;/td&gt;
&lt;td&gt;A high value with low usage means capacity, not retention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Mono Used&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Memory currently allocated to live managed objects&lt;/td&gt;
&lt;td&gt;Growth here usually means something is still referenced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Allocation churn&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;How fast new managed memory is being allocated and dropped&lt;/td&gt;
&lt;td&gt;Drives GC frequency, and therefore stutter&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Leak&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Live objects that should have been released but are still referenced&lt;/td&gt;
&lt;td&gt;Eventually exhausts memory and can crash the process&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A heap can be large and healthy (a big but stable live set), or moderate and unhealthy (a small live set that keeps growing). Optimization decisions made from the Reserved figure alone will frequently target the wrong subsystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does a Large Mono Heap Slow Down a Unity Game?
&lt;/h2&gt;

&lt;p&gt;Two mechanisms connect heap size to frame time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, allocation triggers collection.&lt;/strong&gt; Every managed allocation adds to the heap; when the heap crosses a threshold, the runtime runs a garbage collection. That collection consumes CPU time inside a frame, which is why sustained allocation shows up as periodic frame-time spikes rather than a smooth slowdown. Reducing allocation frequency reduces the frequency of those spikes, independent of how large the heap currently is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second, reserved memory has a hard ceiling.&lt;/strong&gt; If a project leaks managed memory badly enough, the heap keeps expanding until the process runs out of memory and the game terminates. On constrained devices this can arrive well before the game looks "heavy" in a desktop profile.&lt;/p&gt;

&lt;p&gt;Collecting this data has its own cost, which is why sampling strategy matters. Instrumentation adds work at every probe point, so capturing everything on every frame risks distorting the very frame times you are trying to measure. GameOptim's memory modules therefore sample at key moments — the first frame of a test, every thousand frames, scene-transition frames, and the final frame — instead of recording continuously. Reading a report with that rhythm in mind prevents you from treating a sampling gap as a memory drop.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Tell Whether the Heap Is Actually a Problem?
&lt;/h2&gt;

&lt;p&gt;Compare the metrics against each other and against time. The combinations below separate a leak from a large-but-stable footprint.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Observation across a session&lt;/th&gt;
&lt;th&gt;Likely meaning&lt;/th&gt;
&lt;th&gt;Next check&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Used&lt;/strong&gt; rises steadily and never returns&lt;/td&gt;
&lt;td&gt;Live objects are being retained&lt;/td&gt;
&lt;td&gt;Reference chain — including Lua-held references to Mono objects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Reserved&lt;/strong&gt; rises while &lt;strong&gt;Used&lt;/strong&gt; stays flat&lt;/td&gt;
&lt;td&gt;The heap expanded, but the retained object set did not&lt;/td&gt;
&lt;td&gt;Whether the expansion is bounded; it is not, by itself, evidence of a leak&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Reserved&lt;/strong&gt; and &lt;strong&gt;Used&lt;/strong&gt; both high but stable&lt;/td&gt;
&lt;td&gt;Large live footprint, stable workload&lt;/td&gt;
&lt;td&gt;Whether the device budget tolerates it; optimization is a trade-off decision, not a bug fix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stutter frames cluster around allocation spikes&lt;/td&gt;
&lt;td&gt;GC pressure from allocation churn&lt;/td&gt;
&lt;td&gt;Allocation rate per frame, and any forced collection calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stutter correlates with scene loads&lt;/td&gt;
&lt;td&gt;Load-time allocation, not steady-state&lt;/td&gt;
&lt;td&gt;Loading-path functions rather than gameplay allocation&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;GameOptim's published guidance is to keep the Mono heap within about &lt;strong&gt;80 MB&lt;/strong&gt;, and to run a Mono-mode session for deeper allocation and leak analysis when the heap runs higher than that. Treat 80 MB as the point at which the question becomes worth a dedicated test, not as a pass/fail line: the acceptable ceiling is set by your target device and the rest of your memory budget.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should You Check First?
&lt;/h2&gt;

&lt;p&gt;Work in this order; each step rules out a cheaper explanation before you spend effort on the next.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Confirm the build can report Mono data.&lt;/strong&gt; On IL2CPP, this requires SDK 2.4.5 or later and the &lt;strong&gt;Script Debugging&lt;/strong&gt; option enabled at build time. Without it, the absence of Mono data is a configuration issue, not a finding. Keep build settings identical between runs you intend to compare.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collect a session that includes real gameplay.&lt;/strong&gt; A session that only loads a scene cannot distinguish a live set from a leak. The sampling points — start frame, periodic samples, scene transitions, end frame — are what make growth visible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read Reserved and Used as a pair.&lt;/strong&gt; Establish whether the retainer is capacity or live objects before looking anywhere else.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check Lua-to-Mono references.&lt;/strong&gt; If Lua holds references to Mono objects, those objects are never released, and Mono Used climbs with no C# allocation in sight. Lua heap data and Mono object reference data answer this directly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check whether the stutter frames are collection frames.&lt;/strong&gt; &lt;code&gt;GC.Collect&lt;/code&gt; and &lt;code&gt;UnloadUnused&lt;/code&gt; appear as their own stutter categories, with duration, location, and call frequency. If your spikes belong to those categories, you are looking at collection cost, not at rendering or asset work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Only then look at loading-path functions.&lt;/strong&gt; &lt;code&gt;Shader.Parse&lt;/code&gt;, &lt;code&gt;Shader.CreateGPUProgram&lt;/code&gt;, &lt;code&gt;Instantiate&lt;/code&gt;, and &lt;code&gt;LoadingReadObject&lt;/code&gt; are the common load-time costs. If stutter happens during scene transitions rather than steady state, this is where the time is going.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Should You Optimize?
&lt;/h2&gt;

&lt;p&gt;Prioritize by what the data showed, in this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Retained objects first.&lt;/strong&gt; If Used grows and never drops, fix the reference that keeps the object alive — Lua references are the most common blind spot, because the C# side looks clean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Allocation rate second.&lt;/strong&gt; If Used is stable but stutter follows allocation spikes, reduce per-frame managed allocation. You are targeting GC frequency, not heap size.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forced collection calls third.&lt;/strong&gt; If &lt;code&gt;GC.Collect&lt;/code&gt; or &lt;code&gt;UnloadUnused&lt;/code&gt; shows up as a stutter category, the call sites are in your own code. The data gives you the timing and frequency to judge whether the call is doing work at a moment the frame cannot afford.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loading path last, and only if it matched the symptom.&lt;/strong&gt; Loading stutter is a different problem with different fixes; do not tune steady-state allocation to fix a scene-load spike.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each of these changes should be followed by a new collection run under the same conditions. Because sampling is periodic, a change that only shifts when allocation happens can look subtle in aggregate numbers while being obvious in the stutter frames.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should You Avoid Optimizing Prematurely?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Do not treat the heap number as a diagnosis.&lt;/strong&gt; A large heap with a stable live set is a capacity decision, not a bug. Cutting it requires giving something up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not read Reserved as if it were Used.&lt;/strong&gt; The larger of the two figures is often the less actionable one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not produce a separate Mono build by habit.&lt;/strong&gt; On IL2CPP packages, Mono analysis is available through the SDK and Script Debugging configuration described above.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do not enable every collection mode at once "to be safe."&lt;/strong&gt; Each mode adds instrumentation cost, and the combined overhead affects the run to different degrees. Enable Resource or Lua collection inside an Overview session only when you need data from subsystems that must be read together — for example, a texture's size and its Mono-side wrapper in one report — and follow the documented caveats about the performance impact of combined modes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Practical Recommendations
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Step&lt;/th&gt;
&lt;th&gt;What to inspect&lt;/th&gt;
&lt;th&gt;How to judge&lt;/th&gt;
&lt;th&gt;What to change&lt;/th&gt;
&lt;th&gt;What to expect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;Build configuration&lt;/td&gt;
&lt;td&gt;Mono data present or absent&lt;/td&gt;
&lt;td&gt;Enable Script Debugging, SDK 2.4.5+&lt;/td&gt;
&lt;td&gt;Data becomes available without a Mono build&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;Reserved vs Used&lt;/td&gt;
&lt;td&gt;Which figure is driving the total&lt;/td&gt;
&lt;td&gt;Nothing yet&lt;/td&gt;
&lt;td&gt;A clear statement of capacity vs retention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;Used over time&lt;/td&gt;
&lt;td&gt;Monotonic growth across sampling points&lt;/td&gt;
&lt;td&gt;Retained reference chain, including Lua&lt;/td&gt;
&lt;td&gt;Flattened Used curve after the fix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Stutter frame categories&lt;/td&gt;
&lt;td&gt;Share of frames attributed to GC&lt;/td&gt;
&lt;td&gt;Allocation rate per frame&lt;/td&gt;
&lt;td&gt;Fewer collection-triggered spikes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Collection call sites&lt;/td&gt;
&lt;td&gt;Duration and frequency of &lt;code&gt;GC.Collect&lt;/code&gt; / &lt;code&gt;UnloadUnused&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Call timing in your code&lt;/td&gt;
&lt;td&gt;Predictable, bounded collection cost&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;Scene-load functions&lt;/td&gt;
&lt;td&gt;Load-time stutter categories&lt;/td&gt;
&lt;td&gt;Loading path, not gameplay allocation&lt;/td&gt;
&lt;td&gt;Load spikes addressed at their actual source&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A large Mono heap is a measurement question before it is an optimization question.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mono Reserved&lt;/strong&gt; shows capacity; &lt;strong&gt;Mono Used&lt;/strong&gt; shows retention. Growth in Used is the leak signal.&lt;/li&gt;
&lt;li&gt;GC stutter comes from allocation frequency, not from heap size alone.&lt;/li&gt;
&lt;li&gt;Lua references to Mono objects can retain managed memory invisibly to C#-side review.&lt;/li&gt;
&lt;li&gt;GameOptim suggests keeping the heap within roughly 80 MB and running a Mono-mode test above that — a trigger for investigation, not a failure threshold.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does a large Mono heap always mean a memory leak?&lt;/strong&gt;&lt;br&gt;
No. A heap can be large because a large live set is legitimately retained, or because the runtime reserved capacity it has not yet needed. A leak requires Used memory to keep growing across a session without being released.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is 80 MB a hard limit for a Unity Mono heap?&lt;/strong&gt;&lt;br&gt;
It is GameOptim's suggested ceiling, and the point at which a deeper Mono-mode test is recommended. The real limit depends on your target device's total memory budget and what else the game needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why can't I see Mono data in my IL2CPP build?&lt;/strong&gt;&lt;br&gt;
Check the SDK version and the build option: Mono heap collection on IL2CPP requires SDK 2.4.5 or later with Script Debugging enabled. This is a configuration prerequisite, not a runtime behavior to debug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How can Lua cause a Mono memory leak?&lt;/strong&gt;&lt;br&gt;
When Lua holds a reference to a Mono object, the managed object stays reachable and cannot be collected. Mono object reference data in the report exposes these links, which is why Lua memory and Mono memory are worth reading together.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I enable Mono, Resource, and Lua collection in the same run?&lt;/strong&gt;&lt;br&gt;
Only when you need those subsystems correlated in one report — for example, resource lifetime next to the managed object that owns it. Each enabled mode adds instrumentation cost, so combined runs should be judged against the documented impact rather than assumed to be free.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>resources</category>
      <category>memory</category>
    </item>
    <item>
      <title>How Can You Diagnose Lua Memory Issues in Unity Games?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Mon, 26 Oct 2026 07:56:17 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-can-you-diagnose-lua-memory-issues-in-unity-games-1ee5</link>
      <guid>https://dev.to/gameoptim/how-can-you-diagnose-lua-memory-issues-in-unity-games-1ee5</guid>
      <description>&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Overall Lua heap memory helps track memory usage and the counts of important Lua object types, including tables, userdata, and functions.&lt;/li&gt;
&lt;li&gt;Heap allocation call stacks help identify Lua functions responsible for substantial allocations and guide targeted optimization.&lt;/li&gt;
&lt;li&gt;Reverse call-stack analysis makes it easier to trace allocations to the Lua function and source location responsible for them.&lt;/li&gt;
&lt;li&gt;Cached C# object references can help explain why objects remain referenced and cannot be released as expected.&lt;/li&gt;
&lt;li&gt;Lua source files provide more useful function-location information than bytecode for this analysis, because the reported ending line number is always &lt;code&gt;0&lt;/code&gt; when Lua scripts run as bytecode.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Are the Main Lua Memory Problems in Unity?
&lt;/h2&gt;

&lt;p&gt;Lua is commonly used to support hot updates, allowing development teams to add features and fix bugs without rebuilding the entire game. However, as Lua usage grows, memory allocation and object lifetime management can introduce runtime performance problems.&lt;/p&gt;

&lt;p&gt;Two issues deserve particular attention:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excessive memory allocation: Lua functions allocate substantial amounts of heap memory, potentially increasing garbage collection (GC) frequency and the cost of GC operations.&lt;/li&gt;
&lt;li&gt;Unreleased references: Lua-related references to C# objects remain in a cache, preventing those objects from being released as expected and potentially contributing to C# memory leaks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These problems require different investigations. Allocation analysis helps identify where memory is being created, while reference analysis helps identify objects that remain referenced over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Analyze Overall Lua Heap Memory?
&lt;/h2&gt;

&lt;p&gt;The overall heap memory report tracks Lua's total memory usage over time, along with the counts of three important Lua object types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Table&lt;/li&gt;
&lt;li&gt;Userdata&lt;/li&gt;
&lt;li&gt;Function&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By examining these metrics at different frames, developers can determine how Lua memory usage evolves during gameplay.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Should You Look for in the Memory Trend?
&lt;/h3&gt;

&lt;p&gt;Start by examining Lua's total heap memory across the captured session.&lt;/p&gt;

&lt;p&gt;Ask the following questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Does Lua memory remain within the expected range during the tested gameplay?&lt;/li&gt;
&lt;li&gt;Does memory usage continue to increase as the game runs?&lt;/li&gt;
&lt;li&gt;Do changes in total memory coincide with changes in the number of tables, userdata objects, or functions?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The purpose is to establish whether the observed memory usage matches expectations and whether the trend warrants further investigation.&lt;/p&gt;

&lt;p&gt;An increasing memory trend is a reason to investigate, not sufficient proof of a memory leak. Use the overall report to identify suspicious periods, then inspect detailed allocations or object references to understand what is happening.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Find the Lua Functions Allocating the Most Memory?
&lt;/h2&gt;

&lt;p&gt;The overall heap report shows the memory trend, but it does not by itself identify the functions responsible for allocations.&lt;/p&gt;

&lt;p&gt;The detailed heap allocation report addresses this problem by allowing developers to inspect allocation call stacks for a specific frame.&lt;/p&gt;

&lt;p&gt;This helps answer two practical questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which Lua functions are responsible for substantial heap allocations?&lt;/li&gt;
&lt;li&gt;Which lines of Lua code should be investigated for optimization?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Select a Frame and Inspect Allocation Call Stacks
&lt;/h3&gt;

&lt;p&gt;Choose a frame of interest and examine the allocation call stacks recorded for that frame.&lt;/p&gt;

&lt;p&gt;Focus on functions associated with substantial allocations. Their call stacks provide the context needed to trace allocations through the Lua code.&lt;/p&gt;

&lt;p&gt;This approach helps narrow the investigation from a game-wide memory problem to specific functions that may be worth optimizing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Use Reverse Call-Stack Analysis to Locate the Source
&lt;/h3&gt;

&lt;p&gt;The report also supports a reverse call-stack viewing mode, similar to the reverse analysis available for Mono heap memory.&lt;/p&gt;

&lt;p&gt;Switching the viewing mode makes it easier to identify the deeper Lua functions responsible for allocations, rather than having to work through the original call-stack order.&lt;/p&gt;

&lt;p&gt;The goal is to locate the specific Lua script and source line associated with substantial heap allocation. Developers can then inspect the corresponding code and determine whether the allocation behavior can be improved.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Does Lua Function Naming Matter?
&lt;/h3&gt;

&lt;p&gt;Lua functions are represented using the following naming format:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;X@Y:Z&lt;/code&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;X&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Function name. If the name cannot be obtained, it is shown as &lt;code&gt;unknown&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Y&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Location of the file where the function is defined.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Z&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Ending line number of the function definition.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;There is an important limitation: when Lua scripts run as bytecode, the reported ending line number is always &lt;code&gt;0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For this reason, developers should use Lua source files during testing whenever possible. Source-based testing provides more useful location information when tracing allocations back to the code that produced them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Lua References Cause C# Memory Leaks?
&lt;/h2&gt;

&lt;p&gt;Lua memory analysis is not limited to allocations within the Lua heap. References between Lua and C# can also affect object lifetimes in Unity projects.&lt;/p&gt;

&lt;p&gt;Lua plugins commonly maintain a cache on the C# side for objects accessed by Lua. This cache helps prevent a C# object from being garbage-collected while Lua still needs to access it.&lt;/p&gt;

&lt;p&gt;Without an appropriate reference-management mechanism, a C# object could be collected before Lua attempts to access it again, potentially causing logic errors.&lt;/p&gt;

&lt;p&gt;However, a cached reference can also prevent an object from being released when it is no longer needed. If unnecessary references accumulate, they can contribute to memory leaks on the C# side.&lt;/p&gt;

&lt;p&gt;This is why investigating Lua-related memory issues sometimes requires examining Mono objects rather than looking only at Lua heap usage.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does the Mono Object Reference Report Help?
&lt;/h3&gt;

&lt;p&gt;The Mono object reference report summarizes C# objects held in the relevant caches maintained by Lua plugins.&lt;/p&gt;

&lt;p&gt;It provides two useful types of information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Object types and counts: the types of C# objects present in the cache and the total number of objects for each type.&lt;/li&gt;
&lt;li&gt;Destroyed Unity objects: for types inheriting from &lt;code&gt;UnityEngine.Object&lt;/code&gt;, the report also counts objects that have already been destroyed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second metric is particularly useful when investigating references to Unity objects that have been destroyed but may still appear in the cache.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Can You Identify Suspicious Object References?
&lt;/h3&gt;

&lt;p&gt;Follow this investigation sequence:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Mono object reference report and review the object types and their counts.&lt;/li&gt;
&lt;li&gt;Identify object types whose counts continue to increase across sampling points.&lt;/li&gt;
&lt;li&gt;Compare the references at two different sampling points for a suspicious object type.&lt;/li&gt;
&lt;li&gt;Use the differences to investigate which Lua references may be unnecessary or improperly retained.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The report helps narrow the investigation to specific object types and changes in their reference counts. Developers can then inspect the relevant Lua code and reference-management logic.&lt;/p&gt;

&lt;p&gt;A growing cache count does not automatically establish that every retained object is leaked. The key is to determine whether those references are still required by the game's logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should You Check First When Investigating Lua Memory Issues?
&lt;/h2&gt;

&lt;p&gt;The most efficient starting point depends on the symptom you observe.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Observed symptom&lt;/th&gt;
&lt;th&gt;What to inspect first&lt;/th&gt;
&lt;th&gt;Next step&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lua heap memory is unexpectedly high&lt;/td&gt;
&lt;td&gt;Overall heap memory trend and Lua object counts&lt;/td&gt;
&lt;td&gt;Identify suspicious periods and inspect detailed allocations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Lua heap allocations are substantial&lt;/td&gt;
&lt;td&gt;Per-frame allocation call stacks&lt;/td&gt;
&lt;td&gt;Use reverse call-stack analysis to locate the relevant Lua functions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;C# object counts continue to increase&lt;/td&gt;
&lt;td&gt;Mono object reference report&lt;/td&gt;
&lt;td&gt;Compare object references at different sampling points&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Destroyed Unity objects remain in the cache&lt;/td&gt;
&lt;td&gt;Destroyed-object counts for types inheriting from &lt;code&gt;UnityEngine.Object&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Investigate whether Lua-related references are still being retained&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Allocation locations are difficult to identify&lt;/td&gt;
&lt;td&gt;Lua function names and source-location information&lt;/td&gt;
&lt;td&gt;Prefer source-based Lua testing over bytecode when possible&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This sequence separates three distinct questions: how much memory Lua uses, where Lua allocates memory, and which C# objects remain referenced.&lt;/p&gt;

&lt;p&gt;Investigating the appropriate report first helps avoid optimizing unrelated code or assuming that every memory increase has the same cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Lua Memory Analysis Tools Are Supported?
&lt;/h2&gt;

&lt;p&gt;GameOptim GOT Online's Lua memory analysis supports several widely used Lua plugins:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;uLua&lt;/li&gt;
&lt;li&gt;ToLua&lt;/li&gt;
&lt;li&gt;SLua&lt;/li&gt;
&lt;li&gt;xLua&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If a development team recompiles the Lua native library under a custom name, the library name can be specified through the &lt;code&gt;UWAEngine.SetOverrideLuaLib&lt;/code&gt; interface.&lt;/p&gt;

&lt;p&gt;This configuration is relevant when the project's Lua native library does not use one of the expected library names. Correctly identifying the library helps the analysis support the project's Lua integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Track trends before diagnosing leaks. Overall Lua heap memory and object counts help identify suspicious changes during gameplay.&lt;/li&gt;
&lt;li&gt;Trace allocations to their source. Per-frame allocation call stacks and reverse stack viewing help locate Lua functions and source lines responsible for substantial allocations.&lt;/li&gt;
&lt;li&gt;Use Lua source files during testing when possible. Bytecode execution causes the reported function-ending line number to remain &lt;code&gt;0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Investigate references as well as allocations. Lua plugin caches can retain C# objects and contribute to memory leaks if references are no longer needed.&lt;/li&gt;
&lt;li&gt;Compare multiple sampling points. Changes in cached object counts and references help narrow down suspicious object lifetimes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Does increasing Lua heap memory always indicate a memory leak?
&lt;/h3&gt;

&lt;p&gt;No. An increase in Lua heap memory is a signal to investigate, but it does not prove that a memory leak exists. Check the memory trend, object counts, and detailed allocation data before drawing a conclusion.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. How can I find the Lua function responsible for excessive allocations?
&lt;/h3&gt;

&lt;p&gt;Use the detailed heap allocation report to inspect allocation call stacks for a specific frame. Reverse call-stack viewing can help trace substantial allocations to the relevant Lua function and source location.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Why does the Lua function's ending line number show &lt;code&gt;0&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;When Lua scripts run as bytecode, the reported ending line number is always &lt;code&gt;0&lt;/code&gt;. For more useful source-location information during allocation analysis, use Lua source files in testing whenever possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Why can Lua cause memory leaks in C# objects?
&lt;/h3&gt;

&lt;p&gt;Lua plugins commonly maintain C#-side caches to keep objects referenced by Lua from being collected prematurely. If objects remain in these caches after the references are no longer needed, they may not be released as expected, contributing to C# memory leaks.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. How can I investigate destroyed Unity objects that remain referenced?
&lt;/h3&gt;

&lt;p&gt;Use the Mono object reference report to inspect destroyed-object counts for cached types that inherit from &lt;code&gt;UnityEngine.Object&lt;/code&gt;. Compare references across sampling points and investigate whether Lua-related references are being retained unnecessarily.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>lua</category>
      <category>gamedev</category>
      <category>performance</category>
    </item>
    <item>
      <title>How Can Unity Developers Identify Asset Loading Bottlenecks with GOT Online?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Tue, 20 Oct 2026 08:42:15 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-can-unity-developers-identify-asset-loading-bottlenecks-with-got-online-62b</link>
      <guid>https://dev.to/gameoptim/how-can-unity-developers-identify-asset-loading-bottlenecks-with-got-online-62b</guid>
      <description>&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Asset loading delays and excessive resource operations can cause noticeable stuttering in Unity games. To help developers identify the underlying causes, GameOptim's GOT Online Overview mode introduces Resource Management, which provides quantitative analysis of resource loading and unloading, as well as GameObject instantiation and activation. Developers can inspect execution time, call frequency, AssetBundle information, and the APIs used for resource operations.&lt;/p&gt;

&lt;p&gt;GOT Online also adds scene segmentation, allowing developers to analyze performance costs within specific scenes, UI screens, or other sections of gameplay. These features help development teams narrow down loading bottlenecks and conduct more targeted performance investigations.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;As a Unity project grows in complexity and the number of assets increases, resource loading can become a significant performance concern. However, identifying which resource, AssetBundle, or loading operation is responsible for excessive execution time is not always straightforward.&lt;/p&gt;

&lt;p&gt;GameOptim has enhanced GOT Online's Overview mode with resource management analysis and scene segmentation. These features allow developers to examine resource operations quantitatively and break down performance data into more specific sections, making it easier to investigate loading bottlenecks and understand where execution time is being spent.&lt;/p&gt;

&lt;h1&gt;
  
  
  Main Body
&lt;/h1&gt;

&lt;h2&gt;
  
  
  How Can You Identify Asset Loading Bottlenecks in Unity?
&lt;/h2&gt;

&lt;p&gt;Resource loading is an important area to investigate when diagnosing performance issues. As a project becomes more complex and contains more assets, loading operations can become more noticeable sources of stuttering.&lt;/p&gt;

&lt;p&gt;The key question is: Which resources, AssetBundles, or loading operations are consuming the most time?&lt;/p&gt;

&lt;p&gt;Previously, GameOptim shared techniques for investigating this problem in a &lt;a href="https://www.gameoptim.com/blog/post/LoadingResource" rel="noopener noreferrer"&gt;technical article about resource loading&lt;/a&gt;. With the new Resource Management feature in GOT Online's Overview mode, developers can now quantify the execution costs of individual resource operations directly in the online report.&lt;/p&gt;

&lt;p&gt;The analysis covers operations such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resource loading and unloading.&lt;/li&gt;
&lt;li&gt;GameObject instantiation and activation.&lt;/li&gt;
&lt;li&gt;Execution time and operation frequency.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This detailed breakdown helps developers identify the specific operations that deserve further investigation instead of relying solely on overall loading performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Resources Should You Investigate First?
&lt;/h2&gt;

&lt;p&gt;The Resource Management overview highlights the top 10 resources with the highest loading costs and the top 10 with the highest operation frequencies that warrant attention.&lt;/p&gt;

&lt;p&gt;By surfacing these high-priority resources, GOT Online helps developers focus their investigation on operations with significant execution costs or frequent calls.&lt;/p&gt;

&lt;p&gt;Reviewing these resources first can help teams prioritize their optimization efforts and identify opportunities for improvements without having to inspect every resource individually.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Analyze AssetBundle Loading and Resource APIs?
&lt;/h2&gt;

&lt;p&gt;In addition to the overall resource statistics, GOT Online provides a dedicated Resource Loading/Unloading page for examining individual loading operations.&lt;/p&gt;

&lt;p&gt;For each relevant operation, developers can inspect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AssetBundle: Which AssetBundle contains the loaded resource.&lt;/li&gt;
&lt;li&gt;API used: Which interface was used to load the resource.&lt;/li&gt;
&lt;li&gt;Execution time: How long the loading operation took.&lt;/li&gt;
&lt;li&gt;Call count: How many times the operation occurred.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This information helps developers investigate both the resources involved and the methods used to load them. For example, when a resource appears among the high-cost or high-frequency operations, developers can examine its AssetBundle, loading API, execution time, and call count to better understand the source of the cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Scene Segmentation Improve Performance Analysis?
&lt;/h2&gt;

&lt;p&gt;Performance data aggregated across an entire gameplay session may not provide enough detail to determine which scene or UI section is responsible for a particular cost.&lt;/p&gt;

&lt;p&gt;GOT Online introduces scene segmentation, allowing developers to divide captured performance data into more specific sections. This makes it possible to analyze execution costs for different scenes, UI screens, and other parts of a gameplay flow separately.&lt;/p&gt;

&lt;p&gt;To configure scene segmentation, open Scene Overview → Scene Management and click Add Scene Marker. Enter the segmentation position and scene name to define the new section. GOT Online can then present the corresponding performance analysis based on the updated segmentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  What Does Performance Analysis Look Like Before Scene Segmentation?
&lt;/h3&gt;

&lt;p&gt;Before segmentation, performance data is presented without the newly defined section boundaries, making it harder to isolate costs associated with a particular part of the gameplay flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Does Scene Segmentation Change the Analysis?
&lt;/h3&gt;

&lt;p&gt;After segmentation, developers can examine the data within the newly defined sections, making it easier to distinguish performance costs associated with different scenes or UI sections.&lt;/p&gt;

&lt;p&gt;By dividing performance data into meaningful sections, teams can conduct more focused investigations and better understand how execution costs vary across different parts of the game.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is GOT Online, and Which Performance Analysis Modes Does It Support?
&lt;/h2&gt;

&lt;p&gt;GameOptim GOT Online is a lightweight performance analysis service built on its local testing workflow. Development teams can quickly synchronize locally collected performance data to the GameOptim website and generate online analysis reports.&lt;/p&gt;

&lt;p&gt;GOT Online combines local testing with online report access, allowing teams to review performance data through a centralized reporting workflow.&lt;/p&gt;

&lt;p&gt;The service currently provides four performance analysis modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Overview: Overall performance analysis.&lt;/li&gt;
&lt;li&gt;Mono: Mono heap memory analysis.&lt;/li&gt;
&lt;li&gt;Lua: Lua performance analysis.&lt;/li&gt;
&lt;li&gt;GPU: GPU performance analysis.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These modes support different aspects of game performance investigation, from overall execution costs and resource loading to memory usage, Lua behavior, and GPU performance.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Should Unity Developers Take Away?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Prioritize high-cost resource operations: Use Resource Management in Overview mode to identify resources with high loading costs or operation frequencies.&lt;/li&gt;
&lt;li&gt;Inspect individual loading operations: Check AssetBundle information, the APIs used, execution time, and call count to investigate loading bottlenecks.&lt;/li&gt;
&lt;li&gt;Analyze GameObject operations: Examine the time spent instantiating and activating GameObjects alongside resource loading and unloading.&lt;/li&gt;
&lt;li&gt;Use scene segmentation for finer analysis: Divide performance data into specific scenes or UI sections to isolate execution costs.&lt;/li&gt;
&lt;li&gt;Choose the appropriate analysis mode: Use Overview for overall performance, Mono for heap memory, Lua for Lua performance, and GPU for GPU performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  FAQ
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Q1. How can Unity developers identify which assets cause loading bottlenecks?
&lt;/h3&gt;

&lt;p&gt;Use Resource Management in GOT Online's Overview mode to examine resource loading costs and operation frequencies. The overview highlights the top 10 resources in each category, helping developers prioritize their investigation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q2. What information does GOT Online provide for resource loading operations?
&lt;/h3&gt;

&lt;p&gt;The Resource Loading/Unloading page shows which AssetBundle contains a resource, which API was used, how much time the operation took, and how many times it occurred.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q3. Can GOT Online analyze GameObject instantiation and activation costs?
&lt;/h3&gt;

&lt;p&gt;Yes. Resource Management provides quantitative analysis of GameObject instantiation and activation, alongside resource loading and unloading operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q4. What is scene segmentation in GOT Online?
&lt;/h3&gt;

&lt;p&gt;Scene segmentation allows developers to divide performance data into specific sections, such as individual scenes or UI screens, so they can analyze execution costs more precisely.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q5. How do you configure scene segmentation in GOT Online?
&lt;/h3&gt;

&lt;p&gt;Navigate to Scene Overview → Scene Management, click Add Scene Marker, and enter the segmentation position and scene name. The report can then display performance data according to the defined sections.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q6. Which performance analysis modes does GOT Online support?
&lt;/h3&gt;

&lt;p&gt;GOT Online provides four modes: Overview for overall performance analysis, Mono for Mono heap memory analysis, Lua for Lua performance analysis, and GPU for GPU performance analysis.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>performance</category>
      <category>profiling</category>
    </item>
    <item>
      <title>How Can Unity Developers Identify GC Stutters, Lua Leaks, and Mono Memory Issues with GOT Online?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Fri, 16 Oct 2026 06:26:13 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-can-unity-developers-identify-gc-stutters-lua-leaks-and-mono-memory-issues-with-got-online-2m7e</link>
      <guid>https://dev.to/gameoptim/how-can-unity-developers-identify-gc-stutters-lua-leaks-and-mono-memory-issues-with-got-online-2m7e</guid>
      <description>&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Investigating game performance issues often requires developers to connect CPU execution costs, garbage collection (GC) activity, Lua function calls, and Mono heap memory usage. GameOptim's GOT Online provides analysis capabilities across Overview, Lua, and Mono modes to help development teams identify performance bottlenecks and investigate memory-related problems.&lt;/p&gt;

&lt;p&gt;This article introduces several improvements to these modes, including GC call-frequency monitoring, CPU call-stack visualization, reverse Lua call-stack analysis, Lua leak investigation caused by Mono references, and more detailed Mono heap allocation and object-reference analysis. These features help developers move from observing performance symptoms to examining the functions, objects, and memory changes behind them.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Detect Frequent GC Calls in Unity?
&lt;/h2&gt;

&lt;p&gt;Garbage collection (GC) activity is one of the important indicators to examine when investigating game stuttering. To help developers monitor GC call frequency, GOT Online has added GC statistics to the loading module in Overview mode.&lt;/p&gt;

&lt;p&gt;GC call frequency is influenced by heap memory allocation. When functions allocate more heap memory, or allocate it more frequently, GC can be triggered sooner.&lt;/p&gt;

&lt;p&gt;If &lt;code&gt;GC.Collect&lt;/code&gt; is called frequently, as illustrated in the image above, developers should investigate the allocation behavior of the functions involved. This is particularly important when GC calls become increasingly frequent as the game runs longer.&lt;/p&gt;

&lt;p&gt;In such cases, developers can use GameOptim GOT Online's Mono mode to investigate whether Mono memory is being allocated too quickly or in excessive quantities. This helps connect observed GC activity with potential heap allocation issues that warrant further analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Identify CPU Performance Hotspots More Quickly?
&lt;/h2&gt;

&lt;p&gt;GOT Online has improved the CPU call-stack analysis page to make it easier to understand execution-time trends and identify functions that contribute to CPU workload.&lt;/p&gt;

&lt;p&gt;The CPU execution-time chart displays the overall execution-time trend alongside the trends for top functions. By comparing these curves, developers can quickly identify which functions may be contributing to execution-time peaks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkn0bzloh9gt7xrdo75ms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkn0bzloh9gt7xrdo75ms.png" alt="CPU execution-time trends and top functions in GOT Online" width="800" height="386"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This visualization makes it easier to examine changes in CPU execution time and investigate which functions are associated with unusually high values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F663jabch52m7t2a6r5ci.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F663jabch52m7t2a6r5ci.png" alt="Detailed CPU function execution-time analysis in GOT Online" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The updated page also supports scene-specific analysis. Developers can navigate to a particular scene and examine the execution-time distribution of individual functions within that scene.&lt;/p&gt;

&lt;p&gt;This makes it easier to narrow the investigation to the relevant scene instead of relying only on aggregated CPU performance data.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Reverse Call-Stack Analysis Help Identify Lua Performance Issues?
&lt;/h2&gt;

&lt;p&gt;Reverse analysis is one of the useful features in GOT Online's Lua mode because it helps developers trace memory allocation back through function relationships without repeatedly expanding deep call stacks.&lt;/p&gt;

&lt;p&gt;In reverse-analysis mode, expanding a node displays a list of direct parent functions that call the function represented by that node and generate heap allocations. By following these relationships, developers can trace the allocation back toward the functions responsible for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F26msaw2uogpphev3vb9e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F26msaw2uogpphev3vb9e.png" alt="Reverse call-stack analysis in GOT Online Lua mode" width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This approach reduces the need to navigate deeply nested call stacks one level at a time and helps developers narrow down the underlying allocation source more directly.&lt;/p&gt;

&lt;p&gt;The latest version also adds self-time percentage to the stack information for a selected frame. This metric helps developers identify functions that account for a larger proportion of the execution time within the analyzed stack.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxkk9czo7byu8c5bslbzd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxkk9czo7byu8c5bslbzd.png" alt="Self-time percentage in Lua frame stack information" width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By examining self-time percentage alongside the existing stack information, developers can more easily identify functions that deserve closer investigation when analyzing performance costs.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Investigate Lua Memory Leaks Caused by Mono References?
&lt;/h2&gt;

&lt;p&gt;Lua memory leaks caused by Mono references are another important area of investigation in GOT Online's Lua mode.&lt;/p&gt;

&lt;p&gt;In the latest version, GOT Online improves how Mono objects are presented during leak analysis. Developers can inspect detailed information about Mono objects on a single page, including the number of destroyed objects and how that number changes over time.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu5rplig5gkj54dw2r54y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu5rplig5gkj54dw2r54y.png" alt="Mono object details for Lua leak analysis in GOT Online" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The comparison mode also allows developers to compare different sampling points and examine whether the observed memory changes are reasonable.&lt;/p&gt;

&lt;p&gt;By reviewing object details, destruction counts, and changes between samples, developers can investigate potential Lua leaks associated with Mono references and determine which changes require further analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Understand Where Mono Heap Memory Is Being Used?
&lt;/h2&gt;

&lt;p&gt;High Mono memory usage can be difficult to investigate because memory problems can arise in different ways. Developers need to understand not only how much memory is occupied, but also where that memory is being used.&lt;/p&gt;

&lt;p&gt;GOT Online's latest Mono mode improves the presentation of heap memory leak analysis, making it easier to investigate why Mono memory usage is high and how the memory is distributed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fol98dkyxdy0gusb7tn3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fol98dkyxdy0gusb7tn3x.png" alt="Mono heap memory usage and leak analysis in GOT Online" width="799" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The visualization provides an overview of Mono memory usage, helping developers examine the memory distribution and identify areas that warrant closer investigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can You Trace Mono Heap Memory Back to Specific Functions and Variables?
&lt;/h2&gt;

&lt;p&gt;GOT Online provides additional details at both the function and memory-sample levels to help developers investigate Mono memory usage.&lt;/p&gt;

&lt;p&gt;The function view displays the actual heap memory usage associated with each function during game execution. This helps developers examine which functions are associated with memory consumption.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9zpxas1mdlwe4z6am7az.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9zpxas1mdlwe4z6am7az.png" alt="Function-level Mono heap memory usage in GOT Online" width="799" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Developers can also select any bar in the chart below to inspect details about actual heap memory usage and the variables residing in memory at that sample.&lt;/p&gt;

&lt;p&gt;Within the Mono object reference view, developers can select any two memory samples from the bar chart and compare their memory changes. This comparison helps them identify specific functions associated with memory growth and investigate the corresponding memory increments and variables.&lt;/p&gt;

&lt;p&gt;By tracing changes across sampling points, developers can narrow down potential sources of memory leaks and gather more specific information for further debugging and remediation.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Should Unity Developers Take Away?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Monitor GC call frequency: Use GC statistics in Overview mode to investigate frequent &lt;code&gt;GC.Collect&lt;/code&gt; calls and potential excessive heap allocation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use CPU execution-time trends: Compare overall CPU costs with top-function trends and inspect specific scenes to narrow down performance hotspots.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Trace Lua allocations through reverse analysis: Follow parent-function relationships to investigate allocation sources, and use self-time percentage to identify functions with higher execution costs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compare Mono object samples: Examine object details, destruction counts, and changes between sampling points when investigating Lua leaks caused by Mono references.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Trace Mono memory to functions and variables: Use function-level heap memory data and comparisons between memory samples to investigate memory growth and potential leak sources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  FAQ
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Q1. How can developers investigate frequent GC calls in Unity?
&lt;/h3&gt;

&lt;p&gt;Developers can use the GC statistics in GOT Online's Overview mode to examine GC call frequency. If calls become increasingly frequent during gameplay, they can use Mono mode to investigate whether heap memory allocation is occurring too quickly or in excessive quantities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q2. How does GOT Online help identify CPU performance hotspots?
&lt;/h3&gt;

&lt;p&gt;Overview mode displays overall CPU execution-time trends alongside trends for top functions. Developers can examine execution-time peaks, investigate the functions associated with those peaks, and use scene-specific analysis to inspect function execution-time distributions within individual scenes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q3. What is reverse analysis in GOT Online's Lua mode?
&lt;/h3&gt;

&lt;p&gt;Reverse analysis displays direct parent functions that call a selected function and generate heap allocations. Developers can follow these function relationships to trace allocations toward their sources without repeatedly navigating deeply nested call stacks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q4. How can developers investigate Lua leaks caused by Mono references?
&lt;/h3&gt;

&lt;p&gt;Developers can inspect Mono object details, including destruction counts and their trends, in GOT Online's Lua leak analysis. They can also compare sampling points to investigate memory changes and determine whether the observed increments warrant further investigation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q5. How can GOT Online help investigate Mono memory leaks?
&lt;/h3&gt;

&lt;p&gt;Mono mode provides function-level heap memory usage, detailed information about memory usage at selected samples, and the variables residing in memory. Comparing two sampling points in the Mono object reference view helps developers investigate memory increments and identify functions and variables associated with potential leaks.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>performance</category>
      <category>memory</category>
    </item>
    <item>
      <title>How Can Unity Developers Identify and Analyze Stuttering Frames with GOT Online?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Tue, 13 Oct 2026 09:19:34 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-can-unity-developers-identify-and-analyze-stuttering-frames-with-got-online-5eon</link>
      <guid>https://dev.to/gameoptim/how-can-unity-developers-identify-and-analyze-stuttering-frames-with-got-online-5eon</guid>
      <description>&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;Identifying the root cause of frame stuttering in Unity games can be time-consuming, especially when developers need to inspect performance data and function call stacks manually. GOT Online's Overview mode now includes a Stutter Analysis feature that automatically identifies stuttering frames and provides detailed function stack statistics for each identified point.&lt;/p&gt;

&lt;p&gt;This article explains how stuttering frames are identified in GOT Online, what function stack data is available, and how Unity developers can use this information to investigate performance issues more efficiently.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;Frame stuttering can negatively affect the gameplay experience, but identifying its root cause requires more than simply observing a drop in frame rate. Developers need to determine which frames experienced significant delays and investigate the function calls responsible for the additional execution time.&lt;/p&gt;

&lt;p&gt;To make this process more efficient, GameOptim has introduced Stutter Analysis in GOT Online's Overview mode, incorporating feedback from development teams. The feature identifies stuttering frames during gameplay and provides detailed function stack statistics to help developers investigate the underlying causes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Qualifies as a Stuttering Frame in GOT Online?
&lt;/h2&gt;

&lt;p&gt;GOT Online's Stutter Analysis feature identifies frames that meet both of the following conditions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The current frame time exceeds 83.33 ms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The current frame time exceeds twice the average frame time of the previous three frames.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A frame must satisfy both conditions to be classified as a stuttering frame.&lt;/p&gt;

&lt;p&gt;By applying these criteria, GOT Online lists the identified stuttering frames in a dedicated Stutter Analysis section on the Overview report page. Developers can use this list to quickly locate frames that experienced significant delays during execution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://uploader.shimo.im/f/wYylBgfFa0ARVQzn.png" rel="noopener noreferrer"&gt;Image: Stutter Analysis section in the GOT Online Overview report&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Function Stack Data Is Available for Each Stuttering Point?
&lt;/h2&gt;

&lt;p&gt;Identifying a stuttering frame is only the first step. Developers also need to investigate which function calls contributed to the delay.&lt;/p&gt;

&lt;p&gt;GOT Online provides detailed function stack statistics for the relevant nodes associated with each stuttering point. The available information includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Execution time percentage: The proportion of time attributed to a function or node.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Execution time: The specific time consumed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Call count: The number of times the function was called.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These metrics help developers examine the execution costs associated with abnormal nodes and investigate the function stacks behind a stuttering frame.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://uploader.shimo.im/f/ZwrdQMQIX3y9kgyQ.png" rel="noopener noreferrer"&gt;Image: Function stack statistics for a stuttering point in GOT Online&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Developers Use Stutter Analysis to Investigate Performance Issues?
&lt;/h2&gt;

&lt;p&gt;GOT Online allows developers to switch quickly between different stuttering points and inspect the corresponding function stacks.&lt;/p&gt;

&lt;p&gt;This workflow helps development teams move from identifying a frame-time anomaly to examining the detailed execution data associated with that specific point.&lt;/p&gt;

&lt;p&gt;Rather than investigating every frame manually, developers can focus on the identified stuttering frames, compare the relevant function stack information, and use execution time, time percentage, and call count to investigate potential causes.&lt;/p&gt;

&lt;p&gt;The function stack data provides a more detailed basis for determining which parts of execution warrant further investigation, helping developers locate the specific causes of stuttering more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does Stutter Analysis Fit into the GOT Online Overview Workflow?
&lt;/h2&gt;

&lt;p&gt;Stutter Analysis is integrated directly into the Overview report in GOT Online. Developers can review the list of stuttering frames and inspect the corresponding function stack statistics within the same reporting workflow.&lt;/p&gt;

&lt;p&gt;This integration connects two important stages of performance investigation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Identify abnormal frames: Locate frames that meet the stuttering criteria.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inspect execution details: Examine function stack statistics at each stuttering point to investigate the cause.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By bringing these capabilities together, GOT Online helps streamline the process of moving from frame-time anomalies to detailed performance analysis.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Should Unity Developers Take Away?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Check both stuttering criteria: A frame must exceed 83.33 ms and twice the average frame time of the previous three frames.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start with the identified frames: Use the Stutter Analysis section in the GOT Online Overview report to locate stuttering points.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inspect function stack statistics: Examine execution time percentage, execution time, and call count for relevant nodes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compare different stuttering points: Switch between identified frames to investigate their corresponding function stacks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use detailed execution data to guide investigation: Move beyond identifying frame-time anomalies and investigate the specific causes through function stack analysis.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  FAQ
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Q1. What is considered a stuttering frame in GOT Online?
&lt;/h3&gt;

&lt;p&gt;A frame is classified as a stuttering frame when its frame time exceeds 83.33 ms and is more than twice the average frame time of the previous three frames. Both conditions must be met.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q2. Where can I find stuttering frames in GOT Online?
&lt;/h3&gt;

&lt;p&gt;Stuttering frames are listed in the Stutter Analysis section of the Overview report in the latest version that includes this feature.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q3. What information does GOT Online provide for each stuttering point?
&lt;/h3&gt;

&lt;p&gt;GOT Online provides detailed function stack statistics, including execution time percentage, specific execution time, and call count, helping developers investigate the execution costs associated with abnormal nodes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q4. How can developers investigate the causes of stuttering?
&lt;/h3&gt;

&lt;p&gt;Developers can switch between different stuttering points and inspect their corresponding function stacks. By examining execution time, time percentage, and call count, they can investigate which function calls may be contributing to the observed delays.&lt;/p&gt;

&lt;h3&gt;
  
  
  Q5. Is Stutter Analysis available in GOT Online's Overview mode?
&lt;/h3&gt;

&lt;p&gt;Yes. GameOptim has introduced Stutter Analysis in GOT Online's Overview mode, adding a dedicated section for identified stuttering frames and their associated function stack statistics.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>performance</category>
      <category>stutter</category>
    </item>
    <item>
      <title>How Can Unity Developers Track Managed Heap Allocations on Worker Threads?</title>
      <dc:creator>GameOptim</dc:creator>
      <pubDate>Fri, 09 Oct 2026 03:21:28 +0000</pubDate>
      <link>https://dev.to/gameoptim/how-can-unity-developers-track-managed-heap-allocations-on-worker-threads-2d4e</link>
      <guid>https://dev.to/gameoptim/how-can-unity-developers-track-managed-heap-allocations-on-worker-threads-2d4e</guid>
      <description>&lt;p&gt;Moving work that does not require Unity APIs to worker threads can reduce main-thread pressure and help improve frame rates. However, identifying managed heap allocations on these threads can be challenging because Unity Profiler may not show their &lt;code&gt;GC.Alloc&lt;/code&gt; activity.&lt;/p&gt;

&lt;p&gt;GOT Online's Mono mode now supports &lt;strong&gt;multithreaded allocation statistics&lt;/strong&gt;, allowing developers to inspect managed heap allocations made by non-main threads, investigate potential memory leaks, and compare heap growth between snapshots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.gameoptim.com/?fopt=dev" rel="noopener noreferrer"&gt;New users can get 2 hours of free GOT Online testing time after completing registration.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;To reduce main-thread workload and improve frame rates, Unity developers often move operations that do not depend on Unity APIs to worker threads.&lt;/p&gt;

&lt;p&gt;However, when analyzing managed heap usage, it can be difficult to identify exactly where allocations occur on these threads. This makes memory profiling and leak investigation more challenging.&lt;/p&gt;

&lt;p&gt;To address this issue, GOT Online supports multithreaded statistics in &lt;strong&gt;Mono mode&lt;/strong&gt;. Combined with GOT Online's flexible workflow for testing changes and checking results, this feature helps developers investigate memory allocation issues more efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Should Unity Developers Track Heap Allocations on Worker Threads?
&lt;/h2&gt;

&lt;p&gt;Consider a component that starts two worker threads in &lt;code&gt;Start()&lt;/code&gt;. Both threads periodically allocate managed heap memory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdgtut3ow59ua31mzdrle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdgtut3ow59ua31mzdrle.png" alt=" " width="800" height="1092"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this scenario, Unity Profiler may not display the &lt;code&gt;GC.Alloc&lt;/code&gt; activity associated with these worker-thread allocations.&lt;/p&gt;

&lt;p&gt;However, these allocations still matter. Like allocations on the main thread, they can contribute to garbage collection overhead when allocations occur frequently. If objects remain referenced longer than intended, they can also contribute to sustained heap growth or memory leaks.&lt;/p&gt;

&lt;p&gt;Being able to identify where these allocations originate is therefore important when investigating managed memory usage in multithreaded Unity projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can GOT Online Identify Managed Allocations on Worker Threads?
&lt;/h2&gt;

&lt;p&gt;Run a test using &lt;strong&gt;Mono mode&lt;/strong&gt; in GOT Online, then open the &lt;strong&gt;Detailed Heap Allocations&lt;/strong&gt; page in the performance report.&lt;/p&gt;

&lt;p&gt;Functions associated with allocations on non-main threads appear with the &lt;code&gt;Thread&lt;/code&gt; prefix. This indicates that the function was called on a non-main thread and performed managed heap allocations.&lt;/p&gt;

&lt;p&gt;Select a function to inspect its allocation details.&lt;/p&gt;

&lt;p&gt;This allows developers to investigate allocation activity that may otherwise be difficult to identify when focusing only on the main thread.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Developers Investigate Heap Growth and Potential Memory Leaks?
&lt;/h2&gt;

&lt;p&gt;Allocations on worker threads can also be relevant when investigating managed heap growth.&lt;/p&gt;

&lt;p&gt;If objects remain referenced and cannot be reclaimed by the garbage collector, the corresponding memory growth can be examined in the &lt;strong&gt;Heap Memory Leak Analysis&lt;/strong&gt; panel.&lt;/p&gt;

&lt;p&gt;Developers can locate the relevant function and compare two selected nodes to inspect changes in heap usage between them.&lt;/p&gt;

&lt;p&gt;This comparison helps developers investigate whether heap usage is increasing over time and narrow down the functions associated with that growth.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Can Developers Inspect the Objects Behind Heap Allocations?
&lt;/h2&gt;

&lt;p&gt;After identifying a function of interest, click the blue button on the right to view the associated managed heap object types.&lt;/p&gt;

&lt;p&gt;The report displays the allocation size and object count for each type, helping developers understand which objects account for the observed memory usage.&lt;/p&gt;

&lt;p&gt;This additional detail can help developers determine whether a function is allocating too frequently or contributing significantly to heap growth.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should Unity Developers Take Away?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Moving work to worker threads can reduce main-thread pressure, but managed heap allocations on those threads still need to be monitored.&lt;/li&gt;
&lt;li&gt;Unity Profiler may not expose all worker-thread allocation activity through the expected &lt;code&gt;GC.Alloc&lt;/code&gt; view.&lt;/li&gt;
&lt;li&gt;GOT Online Mono mode identifies non-main-thread allocation functions with the &lt;code&gt;Thread&lt;/code&gt; prefix.&lt;/li&gt;
&lt;li&gt;The Detailed Heap Allocations page provides function-level allocation details.&lt;/li&gt;
&lt;li&gt;Heap Memory Leak Analysis helps developers investigate memory growth and compare selected nodes.&lt;/li&gt;
&lt;li&gt;Object type, allocation size, and object count provide additional clues for diagnosing memory issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By including worker-thread allocations in managed memory analysis, Unity teams can investigate heap usage more comprehensively instead of focusing exclusively on the main thread.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can worker threads allocate managed heap memory in Unity?
&lt;/h3&gt;

&lt;p&gt;Yes. Worker-thread code can allocate managed objects, depending on the operations it performs. These allocations can contribute to garbage collection overhead and sustained heap growth.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why might Unity Profiler not show worker-thread allocations in the expected &lt;code&gt;GC.Alloc&lt;/code&gt; view?
&lt;/h3&gt;

&lt;p&gt;The allocation activity described here may not be visible in the usual Unity Profiler view. GOT Online Mono mode provides additional statistics for investigating managed heap allocations made by non-main threads.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does GOT Online identify worker-thread allocation functions?
&lt;/h3&gt;

&lt;p&gt;In the Detailed Heap Allocations page, functions associated with allocations on non-main threads are marked with the &lt;code&gt;Thread&lt;/code&gt; prefix.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can GOT Online help investigate memory leaks involving worker threads?
&lt;/h3&gt;

&lt;p&gt;Yes. Developers can use Heap Memory Leak Analysis to examine heap growth associated with relevant functions and compare two selected nodes. Object types, allocation sizes, and object counts provide further information for investigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  About GameOptim GOT Online
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GameOptim GOT Online&lt;/strong&gt; is a cloud-based performance analysis platform for Unity game development. It provides tools for investigating CPU, GPU, and memory performance, helping development teams identify bottlenecks and analyze issues using detailed test reports.&lt;/p&gt;

&lt;p&gt;Its Mono mode supports managed heap allocation analysis, including multithreaded allocation statistics, to help developers investigate memory behavior beyond the main thread.&lt;/p&gt;

</description>
      <category>unity3d</category>
      <category>gamedev</category>
      <category>memory</category>
      <category>performance</category>
    </item>
  </channel>
</rss>
