Giter VIP home page Giter VIP logo

Comments (4)

Hollelihanqi avatar Hollelihanqi commented on July 4, 2024

在多个子应用同时激活的情况下 ,第一次进入打开页面其它子应用加载比较,出现白屏

from wujie.

yiludege avatar yiludege commented on July 4, 2024

一个子应用的加载可以分为三个过程:

1、静态资源的请求下载,2、资源的运行,包括html的解析、js的解析执行,3、子应用的实例mount

其中 过程 1 可以通过 preloadApp 来提前加载,2 和 3 可以通过 preloadApp 的 exec模式来提前执行,但是这个preloadApp是相当于将子应用的加载提前来做

如果子应用从来都没有加载也没有采用preloadApp预加载,那么就要经历过程1、2、3,白屏时间较长

如果子应用之前已经加载过了:

  • 运行的是保活模式(sync = true),那么子应用重新打开过程1、2、3都不需要,无白屏时间
  • 运行的是单例模式(sync = false && 做了生命周期适配),那么子应用会重新进行只会过程3,白屏时间很短
  • 运行的是重建模式(sync = false && 没有做生命周期适配),那么子应用重新打开会进行过程2、3,白屏时间较长

from wujie.

jk4235 avatar jk4235 commented on July 4, 2024

可以考虑增加loader,减少焦虑😄

from wujie.

yiludege avatar yiludege commented on July 4, 2024

@jk4235 loader 已经全覆盖 html、css、js,用户主动性非常大了

from wujie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.