question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: `ion-tabs` routing between tabs is slow

See original GitHub issue

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Switching between tabs is slow (500ms+) when using my app on my iOS device. This results in a laggy feel which is not desired. It works great on my desktop in both Safari and Chrome.

I have just started with this app so there isn’t a lot going on in the tabs. How can I debug this further to see why it’s taking so long?

Timeline

Expected Behavior

It should feel more snappy.

Steps to Reproduce

Switch between tabs.

Code Reproduction URL

https://github.com/Livijn/lag-tester

Ionic Info

Ionic:

   Ionic CLI       : 6.18.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/vue 6.0.0-rc.3

Capacitor:

   Capacitor CLI      : 3.3.2
   @capacitor/android : not installed
   @capacitor/core    : 3.3.2
   @capacitor/ios     : 3.3.2

Utility:

   cordova-res (update available: 0.15.4) : 0.15.3
   native-run                             : 1.5.0

System:

   NodeJS : v16.1.0 (/usr/local/Cellar/node/16.1.0/bin/node)
   npm    : 7.11.2
   OS     : macOS Monterey

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:18 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
hellokingdomcommented, Dec 9, 2021

@sean-perkins @Livijn I wanted to chip in here that I an in the process of producing a repo to identify the same issue.

What I have tested is switching routes with a setInterval to remove any possible touch/input delay. Doing so demonstrates that Ionic is capable of rendering the tabbed pages extremely quickly. On an iPhone XR I can toggle between each tab in a few milliseconds.

Changing routes via a tap on the tabs adds a considerable delay. I have also demonstrated the delay is reduced when the change is triggered via an IonButton within the tab content.

On my Android device i can toggle between tabs nearly instantly and alternate between each tab without delay. On an iPhone XR with considerably better JS performance it’s not possible to replicate the same tab switching performance.

Note: My experience relates to Ionic React

4reactions
sean-perkinscommented, Dec 8, 2021

@Livijn thanks for the added context. Instagram definitely has a more responsive feel with the tab changes.

This issue may relate to another issue (#24337 discussion) I’m currently exploring where the Vue Router implementation for tabs is unmounting the tab when you navigate between tabs, when it shouldn’t.

Regardless, I agree the time/interaction between tab transitions should be just as snappy as Instagram feels.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Does ionic takes care of the 300ms delay in tabs
When I navigate between the tabs I notice a delay in Samsung Note I. Does ionic takes care of the 300ms delay? I...
Read more >
XCode7 slow switching tabs | Apple Developer Forums
Switching between code tabs occassionally causes Xcode to process for 1-5 minutes. Activity Monitor shows 100% CPU usage, although all other applications ...
Read more >
Ion tabs: how to remember which tab needs to be opened ...
I'm using ion-tabs and some separate pages. I have a link in one of the tabs. ... Plunker - Template For Ionic 0.9.19...
Read more >
Switching between tabs is very slow since I added Ionic
I just added Ionic to my existing React app and, then, impleted the @ionic/react-router. But after to modify my navigation tabs, I notice...
Read more >
Adding Tabs Navigation in Ionic 4 and Angular App - Morioh
Tabs elements help users to navigate between various pages easily, ... The ion-tabs component is a router outlet without having a particular style....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found