mac-gallagher / Shuffle

🔥 A multi-directional card swiping library inspired by Tinder
MIT License
894 stars 138 forks source link

Investigate layer rasterization performance improvements #18

Open mac-gallagher opened 5 years ago

mac-gallagher commented 5 years ago

Curious to know whether setting

layer.shouldRasterize = true
layer.rasterizationScale = UIScreen.main.scale

on the swipe cards provides any performance improvements. Since the overlay views animate their alpha value, the answer is not cut-and-dry to me. Maybe set it only on certain subviews?Should profile with Core Animation instrument.

mac-gallagher commented 4 years ago

Decided to table this issue. The dropped FPS is only visible on simulators. On multiple real iOS devices, the Core Animation profiler reached 60 FPS under constant swiping. Can reopen this if necessary

mac-gallagher commented 4 years ago

Some great resources:

mac-gallagher commented 3 years ago

Reopening since rasterization should be enabled by default on the footer and content to avoid jagged edges during dragging