UIKit-cross-platform icon indicating copy to clipboard operation
UIKit-cross-platform copied to clipboard

Improve Touch (Part 2 - Multitouch)

Open rikner opened this issue 6 years ago • 6 comments
trafficstars

Motivation (current vs expected behavior)

Adds support for multitouch

Currently the branch causes huge slowdowns with multitouch, we may need to reorganise some code to make this efficient

ToDo

  • [ ] resolve performance issues when using multi touch

Please check if the PR fulfills these requirements

  • [ ] Self-review: I am confident this is the simplest and clearest way to achieve the expected behaviour
  • [ ] There are no dependencies on other PRs or I have linked dependencies through Zenhub
  • [ ] The commit messages are clean and understandable
  • [ ] Tests for the changes have been added (for bug fixes / features)

rikner avatar Mar 04 '19 14:03 rikner

@rikner what is the status of this PR? I'm marked to review it but it's missing a description etc. Can you please update it when you get a chance and mark me again for review if it's ready? I'm happy to do some work on this at some point myself too if needed

ephemer avatar Apr 17 '19 16:04 ephemer

@ephemer In the initial PR (#265) we refactored the timestamps and introduced multitouch, but had performance issues. I split the initial PR into #282 and this one. Currently the performance issues still exist when using multiple fingers. That's the most important issue we should solve.

rikner avatar May 02 '19 09:05 rikner

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@5bb40a3). Click here to learn what that means. The diff coverage is 27.35%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #283   +/-   ##
=========================================
  Coverage          ?   51.17%           
=========================================
  Files             ?       87           
  Lines             ?     3224           
  Branches          ?        0           
=========================================
  Hits              ?     1650           
  Misses            ?     1574           
  Partials          ?        0
Impacted Files Coverage Δ
Sources/UIScreen.swift 9.09% <ø> (ø)
Sources/UIView+animate.swift 78.37% <ø> (ø)
Sources/UIApplicationDelegate.swift 0% <ø> (ø)
Sources/UINavigationBarAndroid.swift 57.14% <ø> (ø)
Sources/AVPlayerItem+Mac.swift 0% <ø> (ø)
Sources/UIWindow.swift 71.79% <ø> (ø)
Sources/UIAlertAction.swift 0% <ø> (ø)
Sources/SDL2-Shims.swift 0% <ø> (ø)
Sources/DisplayLink.swift 0% <0%> (ø)
Sources/UIViewAnimationGroup.swift 63.63% <0%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5bb40a3...a7719cb. Read the comment docs.

codecov[bot] avatar Feb 24 '20 15:02 codecov[bot]

@ephemer @janek and me merged the latest master and ran this on a device to reproduce the performance issue. As far as I remember the player got unresponsive for a while when using multiple fingers, but that's not the case anymore. We also looked at the Profiler in Android Studio and saw that the CPU usage was not different from when using single vs multi-touch. Could it be that this has been solved by some other PR?

rikner avatar Feb 24 '20 15:02 rikner

Hey @rikner thanks for the update here! I would like to try it especially on a device with weak performance to see, it should be immediately obvious whether there are still issues here.

AFAIK we haven't changed anything in another PR so I'd be kind of surprised if the issues have spontaneously gone away. Also curious as to whether you tried this with our app or with the test app (which might hint whether the performance issues are affected by a larger / deeper view hierarchy). Feel free to ping me when you have time and we can have a look at this together

ephemer avatar Feb 25 '20 19:02 ephemer

@ephemer @janek and me also tested it on the rather crappy samsung phone we have in the office. we did not see anything suspicious in the CPU usage. But let's compare the CPU usage between this branch and master again. I'll get to you with that.

rikner avatar Feb 26 '20 11:02 rikner