《Disney +》 迪士尼、Marvel、彼思、星球大戰…  侍魂初代 Boss 終於參戰!「天草四郎時貞」確定於 侍魂 曉 登場!   《Horizon Forbidden West》遊戲畫面搶先看,只在今天的 State of Play   「Fate Project 大晦日TV Special 2021」放送決定!   沒有PS5也能遊玩了!PC版「FINAL FANTASY VII REMAKE INTERGRADE」將於Epic Games Store發售!   「明星大亂鬥特別版 最後之特別番組」就是「索拉的使用方法」!發表內容總結!   獎金總額1,000萬日幣!由專業6團體進行eSport大賽「決勝時刻 專業對抗戰」正式開打!   FIA Certified Gran Turismo Championships於2021賽季隆重回歸   《Crash Bandicoot™ 4: It’s About Time》即將登上PS5 

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

隨機商業新聞

Addidas