title: Ionic performance slow older devices
body: <p>I've built an Ionic 5 (with vue 3) app that uses <a href="https://ionicframework.com/docs/native/ble" rel="nofollow noreferrer">BLE</a> to measure airflow of an bluetooth airflow device (mainly <a href="https://www.woehler-international.com/shop/products/measuring-instruments/ventilation-and-air-quality/?tl_stroemungsgeschwindigkeit=1099" rel="nofollow noreferrer">Wöhler</a> products).
  These products constantly send out a reading of airflow measured.</p>
  <h5>The app:</h5>
  <p>A user presses a button in the app to start the measurement, a timer will show how long a user is measuring for and within <strong>at least</strong> 5 seconds the measurement has to be done.</p>
  <h5>The problem:</h5>
  <p>On older smartphones (mainly android) performance is very slow. The timer displayed ofthen does not represent &quot;real&quot; seconds, it's delayed, measurements on older phones often take 8 &quot;real&quot; seconds. The timer displayed:</p>
  <pre class="lang-js prettyprint-override"><code>const counterInterval = setInterval(async () =&gt; {
      ...
      counter.value += 0.01;
  }, 10);
  </code></pre>
  <p>Not only that but it seems the application can't keep up with the Bluetooth pings on older devices. Because (I suspect) the runtimeclock of the whole ionic application is slow sometimes I get no pings from Bluetooth devices, sometimes 5 in a row. I know for a fact the Wöhler devices send a ping every 100ms or so.</p>
  <p>I've also tested a <strong>native</strong> application that almost does the same thing my app does, even on older devices there is no delay and the app receives all the pings sent.</p>
  <h5>My question:</h5>
  <p>Is it normal for Ionic apps to perform significantly slower than native apps when running on older devices (4 years ago).
  Is there any way I can improve performance? (bundle size is very low, I don't import fonts or images)</p>
  <p>Personally I've tested with:</p>
  <ul>
  <li>Redmi 9A (timer and bluetooth is slow)</li>
  <li>iPhone 8 Plus (timer is fast)</li>
  <li>iPhone 12 Pro Max (timer is fast)</li>
  </ul>