dimillian,
@dimillian@mastodon.social avatar

Ice Cubes have some very visible slowdown when scrolling the timeline on the Vision Pro. I’ve tried everything I can, and I can’t isolate it. The profiler gives me nothing interesting, and I’ve been attempting to remove every view one by one and come to no real conclusion. I have no idea what is going on. My guess is that it’s the iOS micro stutters people are telling me about but more visible but I’m not even sure anymore.

tomkraina,
@tomkraina@mastodon.social avatar

@dimillian Have you tried profiling and looking in SwiftUI Instrument in Instruments.app? .help is one of the performance hogs in my experience, that's something I had to !os(visionOS) off. Another thing I found was the usage Buttons... (resolving button style was super expensive) so switched to onTap + hoverEffect + .accessibilityAddTraits(.isButton)

dimillian,
@dimillian@mastodon.social avatar

@tomkraina The thing about the buttons is very interesting; I’m using them a lot. I feel like this could also be valid on iOS?

dimillian,
@dimillian@mastodon.social avatar

@tomkraina Oh yes, I’m trying every day, but I find nothing relevant. How did you find out that the help or button was slow? I’m looking at the time profiler and the body timing but it’s not obvious that those could be problematic. I find SwiftUI really hard to profile.

dimillian,
@dimillian@mastodon.social avatar

I think I just found out something! It seems to be the … context menu on every post row. Removing it definitely speeds up the whole thing!

its_john_davis,
@its_john_davis@mastodon.social avatar

@dimillian what about moving that to to the ForEach?

iX901,
@iX901@techhub.social avatar

@dimillian I have a question
why don’t you use .task?
.task work as onAppear with Task {}

dimillian,
@dimillian@mastodon.social avatar

@iX901 In this specific context I forgot, but probably because at some point .task was triggered on the menu before it appears.

ellenich,
@ellenich@techhub.social avatar

@dimillian My first suspect would be the glass on glass effect.

Maybe background blur + darker background blur on top is effecting performance?

dimillian,
@dimillian@mastodon.social avatar

@ellenich This is OS level API, same results with an opaque background unfortunately.

drheho,

@dimillian could it be that it’s not only Vision Pro related. For me on a iPhone 15 pro scrolling is also horrible and lagging

dimillian,
@dimillian@mastodon.social avatar

@drheho it’s that horrible?

rstockm,
@rstockm@chaos.social avatar

@dimillian @drheho iPhone 14 Pro here an it’s far from horrible - you‘ve come a long way already. But it’s not as butter-smooth as most other iOS Apps.
But to keep things into perspective: should be considered a „pro“ App and the stuttering is WAY worse.

dimillian,
@dimillian@mastodon.social avatar

@rstockm @drheho can you go in display settings and set the action buttons to none and tell me if it fix it?

drheho,

@dimillian @rstockm okay, okay. It’s not horrible but I would really love to have it smooth like I other apps.
Feels like it’s a bit smoother after disabling the action buttons.

gnuntoo,

@dimillian do you not get iOS micro stutters?

dimillian,
@dimillian@mastodon.social avatar
christianselig,
@christianselig@mastodon.social avatar

@dimillian Have you tried on device? It's definitely more than micro, feels really laggy. Looks very beautiful though!

dimillian,
@dimillian@mastodon.social avatar

@christianselig Yeah it’s as laggy in the simulator. As soon as a post is on screen it’s laggy. I don’t get it really :/

dimillian,
@dimillian@mastodon.social avatar

@christianselig I’m waiting for your pull request to fix it

axxl,
@axxl@mastodon.social avatar

@dimillian I've seen some pretty big lag spikes too, don't think it's a microstutter. Likely something in SwiftUI that maybe Apple can fix?

dimillian,
@dimillian@mastodon.social avatar

@axxl My guess yes, and I don’t have the proper tooling to see the origin. According to the profiler everything is smooth and fast…

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@dimillian if you have .tooltip set on anything, it's a real performance hog — because it creates a new ornament for each instance

dimillian,
@dimillian@mastodon.social avatar

@stroughtonsmith :(. I even tried to remove context menu, accessibility tagging, row swipe gestures, but nop.

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@dimillian uhhh is it .help in SwiftUI? I'm not familiar

dimillian,
@dimillian@mastodon.social avatar

@stroughtonsmith Oh it is! When you put the .tooltip I thought it was already a SwiftUI API. I see two calls to that, trying to remove them now.

dimillian,
@dimillian@mastodon.social avatar

@stroughtonsmith Nop, those are not even in the timeline hierarchy :/

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@dimillian crap. Yeah I've been fighting that one for a while, is a silent killer: https://mastodon.social/@stroughtonsmith/110775810784557031

dimillian,
@dimillian@mastodon.social avatar

@stroughtonsmith maybe somehow I’m adding some without knowing? Like some accessibility modifier? This lag is looking very similar to mine.

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@dimillian honestly lag could be anything, but this was the most unexpected source of it for me. The file browser suffers from horrendous resize performance in-app because of this, I believe

stroughtonsmith,
@stroughtonsmith@mastodon.social avatar

@dimillian UIToolbar uses tooltips for all its button items, I guess — if there was something you were doing to use UIToolbar (explicitly or implicitly) for your cell controls, I could see it happening by accident

dimillian,
@dimillian@mastodon.social avatar

Anyone with a physical device is more than welcome to take a look.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • modclub
  • Youngstown
  • khanakhh
  • Durango
  • slotface
  • mdbf
  • cubers
  • GTA5RPClips
  • kavyap
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • JUstTest
  • osvaldo12
  • tester
  • tacticalgear
  • ethstaker
  • Leos
  • thenastyranch
  • everett
  • normalnudes
  • anitta
  • provamag3
  • cisconetworking
  • megavids
  • lostlight
  • All magazines