Skip to content

perf(IT-Wallet): [SIW-000] Improve proximity QR code screen performance - #8530

Draft
mastro993 wants to merge 1 commit into
masterfrom
perf/improve-proximity-qrcode-screen-performances
Draft

perf(IT-Wallet): [SIW-000] Improve proximity QR code screen performance#8530
mastro993 wants to merge 1 commit into
masterfrom
perf/improve-proximity-qrcode-screen-performances

Conversation

@mastro993

Copy link
Copy Markdown
Contributor

Short description

Reduce hitching when opening the IT Wallet proximity QR code screen, while still rendering the QR with react-native-qrcode-skia.

List of changes proposed in this pull request

  • Defer mounting react-native-qrcode-skia until after the skeleton has painted, so SVG path generation does not block the first frame
  • Memoize QR props (shapeOptions, logo, size) so the path is built once instead of on every parent re-render
  • Keep a fixed-size QR slot so the branded box does not jump between skeleton and QR
  • Set max brightness immediately on the presentment screen (no 1.5s JS brightness ramp)
  • Add a regression test that skeleton and QR share the same slot size

How to test

  1. Open the wallet home with presentable credentials
  2. Tap Avvia verifica
  3. Confirm the QR screen opens without flicker: skeleton stays until the QR is ready, then the Skia QR appears
  4. Confirm the QR still scans and the IT Wallet logo is in the center
  5. Open the screen twice and confirm the second open does not rebuild the path on unrelated re-renders
  6. Optional: React DevTools profiler on the open
    • String-arrival commit should stay cheap (~1ms)
    • QRCode first mount still does the library's SVG path work (~120ms), isolated after the skeleton paint

Defer react-native-qrcode-skia until after the skeleton paints so
SVG path generation does not block the first frame. Memoize QR
props so the path is built once.
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Jira Pull Request Link

This Pull Request refers to Jira issues:

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.38%. Comparing base (d2bf379) to head (ae68b08).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8530      +/-   ##
==========================================
- Coverage   64.39%   64.38%   -0.02%     
==========================================
  Files        1996     1996              
  Lines       38129    38147      +18     
  Branches     6458     6461       +3     
==========================================
+ Hits        24553    24560       +7     
- Misses      12155    12167      +12     
+ Partials     1421     1420       -1     
Files with missing lines Coverage Δ
...n/proximity/components/ItwProximityQrCodeImage.tsx 93.18% <100.00%> (+4.72%) ⬆️
...roximity/screens/ItwProximityPresentmentScreen.tsx 83.87% <100.00%> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ale-mazz

ale-mazz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@mastro993 I honestly see a worse situation here.

  • Flickers
  • The transition animation is gone
  • The screen brightness is creating a strange effect with a re-render of the whole screen
IMG_0066.MP4

@mastro993
mastro993 marked this pull request as draft September 2, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants