V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
baichen99
V2EX  ›  问与答

想渲染 github 的目录结构, 自己写了一个程序但是运行速度很慢

  •  
  •   baichen99 · Apr 13, 2019 · 1900 views
    This topic created in 2573 days ago, the information mentioned may be changed or developed.

    大家帮忙看看为什么运行速度这么慢?

    项目地址

    tree

    2 replies    2019-04-14 08:55:30 +08:00
    chrisyunhua
        1
    chrisyunhua  
       Apr 13, 2019
    fileNode 和 rootNode 的 `children` property 里面请求网络的部分没有 cache,而且 `_generateTree` 里面好像还递归调用了 `children`
    charlie21
        2
    charlie21  
       Apr 14, 2019
    运行速度很慢 ...
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   972 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 20:09 · PVG 04:09 · LAX 13:09 · JFK 16:09
    ♥ Do have faith in what you're doing.