bugsnag / bugsnag-cocoa-performance

Monitor the start-up, screen loading and network requests of your iOS app and see the results in your BugSnag dashboard.
https://docs.bugsnag.com/performance/integration-guides/ios
MIT License
11 stars 8 forks source link

[Plat-11738] viewDidAppear edge case #257

Closed kstenerud closed 3 months ago

kstenerud commented 3 months ago

Goal

There are edge cases in UIKit container classes whereby a child's viewDidAppear will be delayed by a huge amount (for example from an incomplete swipe to a new view). This throws out our view load span durations.

Design

When we detect a long delay after viewDidLayoutSubviews where viewDidAppear still hasn't been called, assume that this edge case has been triggered and use the time of viewDidLayoutSubviews instead.

Testing

Added e2e test.

github-actions[bot] commented 3 months ago

BugsnagPerformance.framework binary size increased by 1,424 bytes from 510,264 to 511,688

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.5%    +864  +0.5%    +864    String Table
  +0.5%    +480  +0.5%    +480    Symbol Table
  +0.5%    +452  +0.5%    +452    __TEXT,__text
  +0.6%     +60  +0.6%     +60    __TEXT,__gcc_except_tab
  +1.5%     +48  +1.5%     +48    Lazy Binding Info
  +1.0%     +48  +1.0%     +48    __DATA_CONST,__const
  +1.0%     +40  +1.0%     +40    __TEXT,__unwind_info
  +1.7%     +24  +1.7%     +24    __TEXT,__stub_helper
  +1.7%     +24  +1.7%     +24    __TEXT,__stubs
  +1.4%     +16  +1.4%     +16    Indirect Symbol Table
  +1.7%     +16  +1.7%     +16    __DATA,__la_symbol_ptr
  +0.8%      +8  +0.8%      +8    Function Start Addresses
  +1.0%      +8  +1.0%      +8    Rebase Info
  -0.1%     -16  -0.1%     -16    [__DATA]
  -1.1%     -48  -1.1%     -48    [__DATA_CONST]
  -1.4%    -600  -1.4%    -600    [__TEXT]
  [ = ]       0 -10.2% -1.39Ki    [__LINKEDIT]
  +0.3% +1.39Ki  [ = ]       0    TOTAL

Generated by :no_entry_sign: Danger