《Disney +》 迪士尼、Marvel、彼思、星球大戰…  Pokemon東京香蕉 波加曼版登錄日本7-Eleven   《Horizon Forbidden West》遊戲畫面搶先看,只在今天的 State of Play   在明天穿上《怪奇物語》跨界造型並進入《Smite》中的顛倒世界   《Deathloop》爽快踢擊的誕生   Quill的史詩冒險將在即將於PS VR上推出的《Moss: Book II》中繼續進行   《Returnal》:令人難忘的海伯利昂之戰製作特輯   《Arizona Sunshine》創作者的PS VR新作《After the Fall》帶來快節奏協力FPS動作體驗   勇者鬥惡龍主題樂園「DRAGON QUEST ISLAND 大魔王索瑪與起始之島」開幕日確定! 

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

隨機商業新聞

Micorsoft