Skip to content

Profile and improve performance #1168

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 19, 2025
Merged

Profile and improve performance #1168

merged 2 commits into from
Apr 19, 2025

Conversation

BPerlakiH
Copy link
Collaborator

@BPerlakiH BPerlakiH commented Apr 18, 2025

Related to #1167

Things I have found on macOS and iPhone.

Both the date formatter and the web-view configuration object is slow to create and we only really need one of each.

The date formatter is mainly used in defaultResponseHeaders (video local streaming).

BEFORE:

Screenshot 2025-04-18 at 22 01 19

AFTER:

Screenshot 2025-04-18 at 22 43 11

And opening a new browser tab is also improved.
(The first time measured will be longer in both cases, as the configuration and the first browser setup will take more time).

BEFORE

TIMER:: BrowserViewModel.init() took: 0.2607688333373517
TIMER:: BrowserViewModel.init() took: 0.011252750060521066
TIMER:: BrowserViewModel.init() took: 0.011210291646420956
TIMER:: BrowserViewModel.init() took: 0.011013375013135374

AFTER

TIMER:: BrowserViewModel.init() took: 0.1968754583504051
TIMER:: BrowserViewModel.init() took: 0.012397083337418735
TIMER:: BrowserViewModel.init() took: 0.005758291692472994
TIMER:: BrowserViewModel.init() took: 0.003947708290070295
TIMER:: BrowserViewModel.init() took: 0.004706125007942319

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 23.90%. Comparing base (c8aa5f5) to head (8d56783).

Files with missing lines Patch % Lines
Model/Utilities/Date+Extension.swift 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1168      +/-   ##
==========================================
+ Coverage   23.43%   23.90%   +0.47%     
==========================================
  Files         137      137              
  Lines        7263     7266       +3     
==========================================
+ Hits         1702     1737      +35     
+ Misses       5561     5529      -32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@kelson42 kelson42 added this to the 3.9.0 milestone Apr 19, 2025
@kelson42 kelson42 merged commit db9348e into main Apr 19, 2025
8 checks passed
@kelson42 kelson42 deleted the 1167-profile-and-improve branch April 19, 2025 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants