《Disney +》 迪士尼、Marvel、彼思、星球大戰…  置身於未來!官方宣布推出PS5全新VR控制器!   Housemarque如何打造《Returnal》的沉浸式DualSense 無線控制器 效果   Steam版「魔物獵人 崛起」提供免費體驗版!從今起可用電腦狩獵了!   「SQUARE ENIX MASTERLINE」第2彈!蒂娜&魔導裝甲&莫古利決定發售!   原神1.4版本更新:來風花節盡情享受愛與生活吧!   在探討離婚的遊戲《雙人成行》,見證劇情與遊戲玩法的巧妙結合   令人開心的大容量!為你送上1包315卡的果凍飲「ENERGY JELLY 300」試喝心得!   讓《Ghost of Tsushima》栩栩如生的精彩視覺效果製作過程 

Vim Profiling 抓出哪邊速度慢

商業

Vim 的外掛很多,裝太多會造成啟動變慢,或者某些時候變慢,要怎麼知道是哪個外掛造成的?或者是哪個 Function 造成速度慢的呢?

Vim Profiling 抓出哪邊速度慢

沒想到 Vim Profiling 的工具光內建就一卡車可以使用,而且各種分析都有~

以下來列 Vim Profiling 的各種作法

  • vim --startuptime vim.log # 離開 Vim 後,查看 vim.log 的檔案,可以看到各個檔案外掛所消耗的時間
  • vim # 於 Vim 內,使用 : 的命令如下:
    1. :profile start profile.log
    2. :profile func
    3. :profile file
    4. " At this point do slow actions
    5. :profile pause
    6. :noautocmd qall!
    7. # 查看 profile.log 會看到 function 每個花的時間
  • vim -V12log # 離開 Vim 後,查看 log 這個檔案內容,會有執行哪些東西
  • vim --cmd 'profile start profile.log'
    --cmd 'profile func '
    --cmd 'profile file '
    -c 'profdel func '
    -c 'profdel file '
    -c 'qa!' # 把所有歷程的 function 都印出來

相關網頁

Tsung

隨機商業新聞

NordVPN