Skip to content

setTimeout in WebViewJavascriptBridge is causing performance problems #132

@jordanpwood

Description

@jordanpwood

We use WebViewJavascriptBridge heavily in our app, and we are running into a performance problem. It is taking between 200 and 1000 milliseconds (occasionally more) to send a group of messages from Objective-C and get their callback responses. I was able to get approximately a 10-fold decrease in the amount of time it takes to get a response by removing the setTimeout wrapper in _dispatchMessageFromObjC. I would like to submit a PR to make it so we can run without the setTimeout. Do you have a suggestion on how? Remove it entirely? Make a flag a parameter to bridgeForWebView?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions