tamotam-com / tamotam-app

(🧪 Early Beta) 🤙 TamoTam. HangOut. Offline.
https://tamotam.com
35 stars 4 forks source link

Dispatching events per page #40

Closed danieldanielecki closed 1 year ago

danieldanielecki commented 2 years ago

Events could've been dispatched per each API's page for performance improvements.

A similar technique has been incorporated in dispatching Ticketmaster events per country: https://github.com/tamotam-com/tamotam-app/commit/57a01df7f7e522c9bc473d4bfff514a8666b0a07. In that case, there are more "refreshes" on the maps while dispatching the events, and those are shown gradually, and the user isn't left with (more) empty maps. For the Ticketmaster events, it was about Europe being completely empty till all events were loaded from APIs. Instead, the maps refreshes per each country-loaded events.

danieldanielecki commented 1 year ago

Use https://github.com/bamlab/react-native-flipper-performance-monitor for monitoring performance and https://github.com/jhen0409/react-native-debugger for debugging while working on this story

danieldanielecki commented 1 year ago

Include also https://rnfirebase.io/perf/axios-integration while working on this story.

danieldanielecki commented 1 year ago

It'll be not done, because rendering is expensive, with splitting actions to separated files in https://github.com/tamotam-com/tamotam-app/commit/55e8f933c611d7bae936b957044ce88048b6d791 we gained lots of performance and it was the bottleneck.

danieldanielecki commented 1 year ago

Last piece of splitting actions to separated files improvement in https://github.com/tamotam-com/tamotam-app/commit/ad566add9d5c50afb68e64266bb81a81eda121ed has been done.

danieldanielecki commented 1 year ago

Include also https://rnfirebase.io/perf/axios-integration while working on this story.

We don't need to add any extra interceptors because it's just for creating extra metric attributes. We're good with the default ones, and we can see everything we need: duration, HTTP response codes, network, CPU, etc. in Firebase's Perfomance tab.

danieldanielecki commented 1 year ago

Regarding debugging, even with https://github.com/jhen0409/react-native-debugger/issues/755#issuecomment-1533892063 I had a blank screen, but once handling Hermes will be done it can be useful debugger, on top of already existing cmd+D developer tools. As of now, it looks like anything related to debugging in Chrome doesn't work.

Regarding https://github.com/bamlab/react-native-flipper-performance-monitor, little problem was clarified in https://github.com/bamlab/react-native-flipper-performance-monitor/issues/84#issuecomment-1536232799, but it wasn't possible to run it.

With those comments, there's nothing more to take a look in this issue. Maybe at some point, it could be helpful to debug, but for now changes related to https://github.com/tamotam-com/tamotam-app/commit/55e8f933c611d7bae936b957044ce88048b6d791 can help with performance improvements.