Skip to content

[Due for payment 2025-03-24] [$250] [LOW] Investigate Profiling: iOS - Chrome/Safari and MacOS - Safari #56787

Closed

Description

@fabioh8010

Context

Slack proposal/discussion: https://expensify.slack.com/archives/C05LX9D6E07/p1738873979343599

Profiling is a critical tool for debugging and optimizing application performance. It allows developers to identify bottlenecks, troubleshoot slowdowns, and ensure the app runs efficiently across all platforms. Without reliable profiling, developers may struggle to diagnose issues, leading to slower issue resolution and potential performance degradation.

Currently, Profiling is only fully functional on native iOS and Android, while other platforms experience incomplete traces, obfuscation issues, or outright failures. This prevents us from effectively diagnosing performance problems in non-native environments, delaying optimizations and making it harder to maintain a high-performing application.

Note: The Profiling option can be enabled/disabled in desktop/browsers by pressing CMD + D to access the Troubleshoot menu and then pressing the Use profiling toggle, and in mobile apps/mobile browsers by performing a four-finger tap in the screen to access the Troubleshoot menu and then pressing the Use profiling toggle.

Problem

  • MacOS/iOS: Chrome/Safari
    • Staging - ❌
      • Profiling "works" but always result in a 48-byte file with empty traces.
      • There's also this warning: [Warning] Profiler is not available in this browser. Ignoring this profiler run....
    • Production - ❌
      • Profiling "works" but always result in a 48-byte file with empty traces.
      • There's also this warning: [Warning] Profiler is not available in this browser. Ignoring this profiler run....

Action Items

  1. I did some research and it looks like all browsers in iOS are required to use the WebKit engine (so they are all "Safari" under the hood), so according to this Safari isn't supported yet, so let's consider hiding this option for Chrome/Safari if the platform is iOS and for Safari if the platform is MacOS.
  2. For a follow-up and if we agree that the effort is worth it, we can explore adding this support to the WebKit engine.

cc @mallenexpensify

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021891659093337244112
  • Upwork Job ID: 1891659093337244112
  • Last Price Increase: 2025-02-25
  • Automatic offers:
    • suneox | Reviewer | 106392734
Issue OwnerCurrent Issue Owner: @mallenexpensify

Activity

  1. changed the title [-][LOW] Investigate Profiling: iOS - Chrome/Safari and MacOS - Chrome[/-] [+][LOW] Investigate Profiling: iOS - Chrome/Safari and MacOS - Safari[/+] on Feb 12, 2025
  2. changed the title [-][LOW] Investigate Profiling: iOS - Chrome/Safari and MacOS - Safari[/-] [+][$250] [LOW] Investigate Profiling: iOS - Chrome/Safari and MacOS - Safari[/+] on Feb 18, 2025
  3. melvin-bot commented on Feb 18, 2025

    @melvin-bot
  4. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 18, 2025
  5. melvin-bot commented on Feb 18, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (External)

  6. M00rish commented on Feb 20, 2025

    @M00rish
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-02-24 17:44:23 UTC.

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    we're hiding profiling option for Chrome/Safari if the platform is iOS and for Safari if the platform is MacOS, because react profiler API lacks support for them

    What is the root cause of that problem?

    we're hiding profiling option for Chrome/Safari if the platform is iOS and for Safari if the platform is MacOS, because react profiler API lacks support for them

    What changes do you think we should make in order to solve the problem?

    we can add a new function to check platforms :

    <ProfilingToolMenu />

    const shouldShowProfileTool = () => {
            const browser = getBrowser();
            const isSafariOrFirefox = browser === CONST.BROWSER.SAFARI || browser === CONST.BROWSER.FIREFOX;
    
            if(isSafariOrFirefox || isChromeIOS()){
                return false;
            }
    
            return true;
        };
    ...
    
    {shouldShowProfilingTool() && <ProfilingToolMenu />}
     <ClientSideLoggingToolMenu />
    
    Details

    Image

    ### What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    What alternative solutions did you explore? (Optional)

  7. github-actions commented on Feb 20, 2025

    @github-actions
    Contributor

    ⚠️ @M00rish Thanks for your proposal. Please update it to follow the proposal template, as proposals are only reviewed if they follow that format (note the mandatory sections).

  8. melvin-bot commented on Feb 21, 2025

    @melvin-bot

    @suneox, @mallenexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

  9. fabioh8010 commented on Feb 24, 2025

    @fabioh8010
    ContributorAuthor

    Checking the proposal

  10. 47 remaining items

  11. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 29, 2025
  12. melvin-bot commented on Mar 29, 2025

    @melvin-bot

    Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  13. mallenexpensify commented on Mar 29, 2025

    @mallenexpensify
    Contributor

    Contributor: @M00rish owed $250 via Upwork
    Contributor+: @suneox paid $250 via Upwork

    @M00rish can you please accept the job and reply here once you have?
    https://www.upwork.com/jobs/~021891659093337244112

    @abekkala I'm going to be OOO and offline for two weeks so I'm reassigning, will pick back up upon my return, thx

  14. abekkala commented on Mar 31, 2025

    @abekkala
    Contributor

    @M00rish bumping @mallenexpensify message above so we can pay this and close it out - thanks!

  15. M00rish commented on Mar 31, 2025

    @M00rish
    Contributor

    @abekkala, can you send me an offer for this job, I applied, but my application did not go through.

    Thanks.

  16. melvin-bot commented on Apr 1, 2025

    @melvin-bot

    @mallenexpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  17. abekkala commented on Apr 1, 2025

    @abekkala
    Contributor
  18. M00rish commented on Apr 1, 2025

    @M00rish
    Contributor

    Accepted thanks

  19. abekkala commented on Apr 1, 2025

    @abekkala
    Contributor

    @M00rish payment sent and contract ended - thank you! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorTask

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions