Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Changed TableViewController to have a Nib file #4074

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

brustolin
Copy link
Contributor

TableViewController is now initialized from a Nib file with an extra view.
This is an additional test for the changes introduced in #4071.

#skip-changelog

Copy link

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1210.12 ms 1235.19 ms 25.07 ms
Size 21.58 KiB 669.74 KiB 648.16 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e324230 1244.43 ms 1252.98 ms 8.55 ms
eb41178 1228.06 ms 1248.37 ms 20.31 ms
83d2d84 1211.31 ms 1227.34 ms 16.03 ms
18d491a 1229.78 ms 1252.67 ms 22.90 ms
596ccc1 1223.80 ms 1249.44 ms 25.64 ms
189b629 1250.64 ms 1261.02 ms 10.38 ms
302ee8b 1194.02 ms 1223.34 ms 29.32 ms
3db3e35 1248.02 ms 1258.35 ms 10.33 ms
89bc37d 1228.20 ms 1257.10 ms 28.90 ms
af1f4dd 1225.39 ms 1245.48 ms 20.09 ms

App size

Revision Plain With Sentry Diff
e324230 22.85 KiB 408.88 KiB 386.03 KiB
eb41178 21.58 KiB 544.86 KiB 523.28 KiB
83d2d84 20.76 KiB 419.66 KiB 398.90 KiB
18d491a 21.58 KiB 544.87 KiB 523.29 KiB
596ccc1 22.84 KiB 401.44 KiB 378.59 KiB
189b629 20.76 KiB 399.69 KiB 378.93 KiB
302ee8b 20.76 KiB 419.62 KiB 398.87 KiB
3db3e35 21.58 KiB 419.21 KiB 397.63 KiB
89bc37d 20.76 KiB 401.53 KiB 380.77 KiB
af1f4dd 22.85 KiB 414.71 KiB 391.86 KiB

@armcknight
Copy link
Member

I don't quite get why we stopped swizzling loadView in #4071... Testing on this branch, I set a symbolic breakpoint for loadView and then navigated to this new table controller based on the XIB, and loadView is still called even though there's no override for it in the implementation.

I also added it back to the list of methods to swizzle and there was no crash. But this test doesn't follow the repro steps outlined in #4070, nor does it seem to follow the description of the comment here. Is that intentional?

@brustolin
Copy link
Contributor Author

and loadView is still called even though there's no override for it in the implementation

This is the UITableViewController loadView implementation that was swizzled, and not or own TableViewController, that has no loadView implementation.

I also added it back to the list of methods to swizzle and there was no crash.

Im not sure what do you mean. loadView was not removed from any list of functions we swizzle.

The fix is at SentryUIViewControllerSwizzling.m line 359. To test it, you may change it back to:

IMP viewControllerImp = class_getMethodImplementation([UIViewController class], selector);

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@armcknight
Copy link
Member

I see what you mean now, I missed that UIAssert.swift is part of the sample apps and not the SDK.
image

@brustolin brustolin merged commit 1ee5a37 into main Jun 18, 2024
@brustolin brustolin deleted the chore/tableviewcontroller-withNib-UItest branch June 18, 2024 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants