Windows 10 will reach EOS (end of support) on October 14, 2025. For more information, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

ఇంకా తెలుసుకోండి

Low performance of NativeMessaging API in Firefox compared to Chromium (dozens of times slower)

  • 2 ప్రత్యుత్తరాలు
  • 0 ఈ సమస్యలు కలిగి ఉన్నాయి
  • 16 వీక్షణలు
  • చివరి సమాధానమిచ్చినది Артём Визгалин

more options

Description: We have encountered a significant performance issue with NativeMessaging API in Firefox when an extension communicates with a native application.

In scenarios where many objects must be enumerated (e.g., ~458 certificates), Firefox is dozens of times slower than Chromium-based browsers.

Environment:

Firefox (latest stable, reproduced in 2025)

Windows 11 x64

Same machine and same native plugin tested in Chrome, Edge, Yandex Browser

Steps to Reproduce:

Create a WebExtension that communicates with a native application via NativeMessaging.

Perform enumeration of a large number of objects (≈ 450–500).

Measure execution time in Firefox vs Chromium.

Actual results:

Firefox: enumeration of 458 objects takes ~2 min 30 sec

Chromium/Edge/Yandex Browser: enumeration of the same 458 objects takes ~5 sec

Additional tests: Round-trip time (RTT) for a single message:

Firefox: ~73.7 ms

Chromium: ~0.3 ms

Because the extension and the plugin exchange a large number of messages, this performance gap becomes critical.

Expected results: NativeMessaging API in Firefox should perform at a level comparable to Chromium browsers, so that extensions relying on heavy message exchange remain usable.

References: Bug 1288912 – Native messaging performance is extremely poor

Although this bug is marked as resolved, performance testing still shows a major discrepancy in the current versions of Firefox.

Question: Is there any ongoing work or plan to optimize the implementation of NativeMessaging API in Firefox to address this performance issue?

Description: We have encountered a significant performance issue with NativeMessaging API in Firefox when an extension communicates with a native application. In scenarios where many objects must be enumerated (e.g., ~458 certificates), Firefox is dozens of times slower than Chromium-based browsers. Environment: Firefox (latest stable, reproduced in 2025) Windows 11 x64 Same machine and same native plugin tested in Chrome, Edge, Yandex Browser Steps to Reproduce: Create a WebExtension that communicates with a native application via NativeMessaging. Perform enumeration of a large number of objects (≈ 450–500). Measure execution time in Firefox vs Chromium. Actual results: Firefox: enumeration of 458 objects takes ~2 min 30 sec Chromium/Edge/Yandex Browser: enumeration of the same 458 objects takes ~5 sec Additional tests: Round-trip time (RTT) for a single message: Firefox: ~73.7 ms Chromium: ~0.3 ms Because the extension and the plugin exchange a large number of messages, this performance gap becomes critical. Expected results: NativeMessaging API in Firefox should perform at a level comparable to Chromium browsers, so that extensions relying on heavy message exchange remain usable. References: Bug 1288912 – Native messaging performance is extremely poor Although this bug is marked as resolved, performance testing still shows a major discrepancy in the current versions of Firefox. Question: Is there any ongoing work or plan to optimize the implementation of NativeMessaging API in Firefox to address this performance issue?
జోడించిన స్క్రీన్షాట్లు

ప్రత్యుత్తరాలన్నీ (2)

more options

Could you report it on https://bugzilla.mozilla.org ? That old bug is closed.

It would be nice to attach a perf profile to your bug.

Thanks.

ఉపయోగపడిందా?

more options

TyDraniu said

Could you report it on https://bugzilla.mozilla.org ? That old bug is closed. It would be nice to attach a perf profile to your bug. Thanks.

Thank you for your quick response.

I noticed an interesting effect while testing with the profiler:

When I start "Record a performance profile", the enumeration of certificates (≈458 objects) completes much faster — about 1 minute.

When I do not enable profiling, the same operation takes about 5 minutes, as originally reported.

So, enabling performance profiling significantly reduces the delay, which looks unusual. It seems that recording a profile changes the timing/behavior of the NativeMessaging communication in Firefox.

ఉపయోగపడిందా?

ఒక ప్రశ్న అడగండి

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.