Skip to content
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

Apollo Client is 4-10× slower with Hermes vs. JSC #1486

Open
2 tasks done
SimpleCreations opened this issue Aug 20, 2024 · 1 comment
Open
2 tasks done

Apollo Client is 4-10× slower with Hermes vs. JSC #1486

SimpleCreations opened this issue Aug 20, 2024 · 1 comment
Labels
need more info Awating additional info before proceeding

Comments

@SimpleCreations
Copy link

Bug Description

I've noticed a UI freeze when using Apollo Client's local resolvers for sizable amount of data (1000-2000 entities). It turned out that the query resolution runs 4-10 times slower with Hermes enabled.

  • I have run gradle clean and confirmed this bug does not occur with JSC
  • The issue is reproducible with the latest version of React Native.

React Native version: 0.75.1
OS: iOS

Steps To Reproduce

Here's a repo that mimics my real-world use case:
https://github.com/SimpleCreations/hermes-apollo-client-perf-repro

Please let me know if there's any way I can help narrow down the issue.

Results on simulator

Hermes

Query execution time: 2524.45595908165
Query execution time: 2335.8469998836517
Query execution time: 2370.824375152588

JSC

Query execution time: 330.4612500667572
Query execution time: 245.70958304405212
Query execution time: 240.48808312416077

Results on a real device (iPhone 13 Pro)

Hermes

Query execution time: 2389.434458732605
Query execution time: 2270.058291912079
Query execution time: 2291.424584388733

JSC

Query execution time: 625.5239171981812
Query execution time: 538.3270416259766
Query execution time: 528.1435828208923
@SimpleCreations SimpleCreations added the bug Something isn't working label Aug 20, 2024
@tmikov tmikov added need more info Awating additional info before proceeding and removed bug Something isn't working labels Aug 20, 2024
@tmikov
Copy link
Contributor

tmikov commented Aug 20, 2024

Thanks we will look into this. Hermes is usually faster than JSC on iOS devices, so this slowdown must be caused by something specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need more info Awating additional info before proceeding
Projects
None yet
Development

No branches or pull requests

2 participants