Skip to content

Build1 publisher2 min readPublished

Rendering and layout took 47 percent of the tickets after Discord's iOS Fabric flip

Software Mansion spent almost a year on Discord's iOS app after the New Architecture switch was already on, and its ticket breakdown puts build systems, codegen and dependency bumps at 14 percent of the work to reach parity.

The Engineer · Build desk

Illustration accompanying Rendering and layout took 47 percent of the tickets after Discord's iOS Fabric flip

What happened

  • Software Mansion spent almost a year embedded within Discord's mobile teams getting the iOS app onto React Native's New Architecture.
  • Discord ran the migration one platform at a time, Android first and iOS second.
  • Grouped by category, rendering and layout accounted for 47 percent of the tickets Software Mansion closed on the way back to parity with the app it was replacing.
  • The migration proper, meaning build systems, codegen and dependency bumps, came third in that grouping at 14 percent.
  • Software Mansion, which maintains Reanimated, Screens and Gesture Handler, says the hardest failures appeared where those libraries, Fabric and Discord's own code interacted.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • cost The spend lands after the flag is already on: a few hundred small problems sit between an app that launches and an app users will accept, and each one is found by somebody noticing a frame.
  • constraint Code that positions one element from another element's measured coordinates can no longer assume a single window origin, so every anchor point in a large app becomes a candidate for re-measurement.
  • decision Sequencing the switch per platform scopes the parity work per platform too, so a team that copies Discord's approach budgets the long tail twice.
  • precedent Software Mansion presents this gap work as transferable to any app on the New Architecture. Teams that flipped the flag and shipped get a list of categories to check their own regressions against.

Measurement is the contract that broke first. On the old architecture, asking a view where it was returned a position in the window: one origin, the top-left of the screen. Under Fabric, a view is measured relative to its Yoga root, and a modal is its own root [8]. Outside a modal, the root of the tree is the top of the window, so both answers are identical [9]. The code keeps working and the numbers keep looking right.

Discord's context menu is where the two spaces separate. It renders in a FullWindowOverlay that spans the whole window, positioned from coordinates measured on the row you long-pressed [10]. Opened from a normal screen, it lands correctly. Opened from inside a modal, the row reports its position relative to the modal, the overlay reads those numbers as window coordinates, and the menu appears offset [11]. That code was written years earlier and worked exactly as intended on the old renderer, and nobody touched it during the migration [19].

Software Mansion described the scope of its year as the stretch between an app that launches and an app as good as the one you are replacing, and put a few hundred small problems in that gap [12][7].

The percentages are shares of one ticket sample. Rendering and layout at 47 percent plus the migration proper at 14 percent leaves 39 percent spread across the remaining rows [15]. Discord's own teams had already spent months getting the app to build and run before Software Mansion joined [2], so the 14 percent covers the build-system, codegen and dependency work that survived into the parity phase, not the whole cost of getting there [18].

For the 47 percent to carry into your own planning, your app needs Discord's shape: a chat surface backed by a native-driven data model, custom rendering optimizations, a decade of accumulated business logic, and a user base that notices a one-frame glitch [16]. The categories are easier to reuse than the percentages. Software Mansion wrote that most of these were not bugs: "They were places where an implicit contract changed: where a view sits on screen, whether it exists in the native tree at all, and how the framework finds your native code." [13]

The rest of the long tail is harder to schedule. Software Mansion lists years-old bugs that had been hiding in plain sight, races that only show up under real production load, and other migrations running in parallel, each bringing its own New Architecture quirks [14]. The official docs cover turning the flag on, and Software Mansion says most apps and libraries have already moved [17].

What to watch

  • Whether the fixes land in upstream Reanimated, Screens and Gesture Handler releases other apps can pick up, or stay in Discord's tree.
  • Whether Software Mansion publishes the full ticket table, including the second-largest bucket it has not named.
  • The two remaining broken assumptions the post promises: whether a view exists in the native tree at all, and how the framework finds native code.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories