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

some suggestions #154

Open
changfuguo opened this issue Jan 29, 2016 · 2 comments
Open

some suggestions #154

changfuguo opened this issue Jan 29, 2016 · 2 comments

Comments

@changfuguo
Copy link

@mjohnston hi , tkank you for the great work~

here i just give some suggestions:

  1. when start rnws first time , we can write the ( from package.json) externals of current rn into a file ,the second time to start rnws, we check the externals 's file for the current version of rn, if exists ,just require the file ,if not exists ,just do like the first ,so we can improve the load speed

  2. we can just use _entry as static files

@ghost
Copy link

ghost commented Mar 6, 2016

Thanks for the suggestion @changfuguo. Given #143 performance enhancements would best serve the community behind any breaking changes discovered as the RN versions roll forward. Would you mind closing this and, if you find the time, submit a PR with the enhancements suggested once they are tested? I'm happy to help test once a PR is submitted, if you feel this is important.

@philikon
Copy link
Collaborator

Thanks for these suggestions.

(1) Mapping React Native's Haste modules to externals is really only necessary if you're writing "naughty" code that directly imports Haste modules (e.g. require('StyleSheet')) rather than accessing the APIs from the react-native module (e.g. `require('react-native').StyleSheet). So for properly written React Native apps, compiling this Haste module dependency map at startup is entirely unnecessary. That's why I made it optional in #155. I just need to release this in a version.

Moreover, we can indeed cache the entire React Native bundle and save bringing up the React Native packager entirely when we have a cached bundle present. I have a prototype working in philikon@e360bf8. There were some minor issues with it, but I can't remember what they were.

(2) I don't quite understand what this means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants