Skip to content

[Bridge] RCTRootView and RCTBridge can only be created with URL #1463

@jwyld

Description

@jwyld

Going through the work of providing a URL to the source is actually slower (noticeably so) for a situation when I have the JS string already.

Speed of startup is very important for me. I have the JS code mapped from disk and in Unicode format already. If I could hand the string I have to the root view creation or to a bridge and then into a root view, this would be a huge win for me. This would bypass the NSURLSessionDataTask as well as the cost of the NSString allocation for the raw text in the JS loader. Additionally, it speeds up the cost of lex in JavaScriptCore by a fraction because the calls through NSString are faster when dealing with native Unicode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions