2009年4月2日 星期四

如何避免 TiddlyWiki 變慢

TiddlyWiki 簡介

簡單的說, TiddlyWiki 是『用單一個 HTML 檔 實現的 Wiki』, 不需要安裝任何程式, 只要有『瀏覽器』就可以 檢視, 編輯, 回存 Wiki。

TiddlyWiki …… 是一個網頁(一個內含CSS+JavaScript的html檔)……,檔案本身同時是程式,也是資訊儲存的地方。你可以寫入、修改、刪除、設定密碼、增加外掛以產生新功能 ……

所有這些事情都在這個檔案上完成。程式也是這個檔,你寫的內容也存回這個檔(尾部),因此你可以一個檔走天下,備份、移動、散佈,全部變得非常簡單。

值得注意的 TiddlyWiki 新發展 (老貓, 2007-02-12)

.

TiddlyWiki 參考資料

.

如何避免 TiddlyWiki 變慢

2007-07 開始用 TiddlyWiki 製作每週的會議記錄, 從一開始的 500KB (TiddlyWiki 本身的 320KB 再加上外掛), 累積到現在 710KB 大約一百多篇 文章 (tiddler), 漸漸覺得 TiddlyWiki 有變慢的跡象, 主要發生在兩種情境 :

  • 瀏覽器一開始載入 TiddlyWiki 的 HTML 檔案
  • 編輯或新增任何一篇 文章 (tiddler)

.

上網搜尋關鍵字 TiddlyWiki Slow 之後, 發現兩篇文章 :

這兩篇文章的重點大致相同, 由此可知確實有人遇到『TiddlyWiki 變慢』的問題, 而且也已經有公認的解決之道。

經過實驗, 我會建議採用下面兩種作法 :

  • 關閉『動畫顯示』
  • 不要顯示『最近更新』

.

2009-04-02_175048 關閉『動畫顯示』---- disabling animations

『動畫顯示』的開關, 在 TiddlyWiki 右側邊欄的『偏好設定』, 而這一項也是我從一開始使用 TiddlyWiki 就採用的作法。

只是, 所有『偏好設定』都是存放在『瀏覽器的 Cookie』---- 包括『動畫顯示』在內 ----, 所以 換了一台電腦 或是 同一台電腦的不同瀏覽器, 或是 Cookie 遺失, 就得要再重新設定一次。

目前還在尋找『儲存在檔案裡頭』的『永遠關閉動畫顯示』 的設定, 以便一勞永逸。

.

不要顯示『最近更新』

『最近更新』也在 TiddlyWiki 的右側邊欄, 它會顯示依修訂日期排序的文章列表。而叫它『最近更新』其實有點『名不符實』, 因為它顯示的其實是依修訂日期排序的『所有文章列表』, 所以當文章數量變多時, 這個『最近更新』就會變成一條巨龍, 而且是『一條動態更新的巨龍』。不僅瀏覽器一開始載入 HTML 檔案時, 需要花不少時間撈出資料來排序出這一條巨龍; 而且編輯或新增任何一篇文章 (tiddler) 時, 也同樣要花時間來『動態更新這一條巨龍』。

所以, 前面提到那兩篇文章的建議都是『不要顯示最近更新』。而在作法上又可以細分成下面幾種 :

  • 直接把『最近更新』和『全部』從右側邊欄拿掉
  • 改變右側邊欄的排序, 使得一般場合顯示『預設文章』或其他內容
  • 將右側邊欄的下半部『收合起來』, 需要時再打開 (詳情見 Tips for speeding … 的最末段)

.

比較 TiddlyWiki  載入內容的時間

2009-04-02_170619-1為了比較每一種作法的改善幅度, 我依照 How big can my file get … ? 的說明, 打開後台選項, 讓 TiddlyWiki 顯示載入內容所花的時間

  • 從右側邊欄的『偏好設定』開始,
  • 點選『偏好設定』最下面的『進階選項』
  • 勾選 選項表格 下方的『顯示未知選項』
  • 勾選 chkDisplayInstrumentation

** 請留意這個設定是存放在『瀏覽器的 Cookie』 , 所以改了設定之後, 不一定要存檔, 只要關閉目前的 TiddlyWiki, 下次就會在右上角看到載入內容所花的時間,

=> 由測試結果可以得知 :

  • 『最近更新』、『全部』、『分類』和『預設文章』都是 動態文章, 都需要一些額外的處理時間, 只是『分類』和『預設文章』內容較少, 所需的時間也比較少。
  • 這些動態文章只有顯示的時候才會佔用時間, 所以它們只要不是預設顯示即可, 不一定要從右側邊欄刪除
  • 如果以縮短載入時間為目的, 最好的方法是在右側邊欄的下半部顯示『靜態文章』或『收合起來』

(1) 顯示『最近更新』(原始)

(2) 顯示『分類』

  直接把『最近更新』和『全部』從右側邊欄拿掉
  • LoadShadows 4 ms
  • LoadFromDiv 402 ms
  • LoadPlugins 146 ms
  • Notify 929 ms
  • Restart 1223 ms
  • Macro init 0 ms
  • Total: 2720 ms
  • LoadShadows 6 ms
  • LoadFromDiv 407 ms
  • LoadPlugins 140 ms
  • Notify 600 ms
  • Restart 778 ms
  • Macro init 0 ms
  • Total: 1947 ms
  • .

    (3) 顯示『預設文章』

    (4) 顯示『靜態說明』

    保留『最近更新』和『全部』, 但是調換頁籤的順序, 讓載入時顯示『預設文章』 同左, 但是載入時顯示另外增加的『靜態說明』
  • LoadShadows 5 ms
  • LoadFromDiv 406 ms
  • LoadPlugins 144 ms
  • Notify 329 ms
  • Restart 508 ms
  • Macro init 0 ms
  • Total: 1408 ms
    • LoadShadows 5 ms
    • LoadFromDiv 411 ms
    • LoadPlugins 150 ms
    • Notify 280 ms
    • Restart 440 ms
    • Macro init 0 ms
    • Total: 1302 ms

    .

    (1) 原始的 SideBarTabs 如下

    SideBarTabs :
    <<tabs txtMainTab "最近更新" "依更新日期排序" TabTimeline "全部" "所有文章" TabAll "分類" "所有標籤" TabTags "更多" "其他" TabMore>>

    (2) 直接把『最近更新』和『全部』從右側邊欄拿掉 => 讓載入時顯示『分類』。
    ** 因為『分類』也是動態文章, 但內容較少, 所以稍省了一點時間。

    SideBarTabs :
    <<tabs txtMainTab "分類" "所有標籤" TabTags "更多" "其他" TabMore>>

    (3) 保留『最近更新』和『全部』, 但是調換頁籤的順序 => 讓載入時顯示『預設文章』。
    ** 『預設文章』(『shadowed tiddler tab』或『Shadow Tiddlers』) 同樣還是動態文章, 但內容更少, 所以又再省了一點時間。

    SideBarTabs :
    <<tabs txtMainTab "更多" "其他" TabMore "最近更新" "依更新日期排序" TabTimeline "全部" "所有文章" TabAll "分類" "所有標籤" TabTags>>

    (4) 同(3), 但是載入時顯示另外增加的『靜態說明』
    ** "管理" 和前面的 "更多" 是同一個分頁, 被移到最前面當作預設的分頁, 叫它 "更多" 有點怪, 於是改名。另外再到 TabMore 增加一個『靜態說明』頁。

    SideBarTabs :
    <<tabs txtMainTab "管理" "管理文章" TabMore "最近更新" "依更新日期排序" TabTimeline "全部" "所有文章" TabAll "分類" "所有標籤" TabTags>>

    TabMore :
    <<tabs txtMoreTab "說明" "參考資料" TW_HELP "未完成" "內容空白的文章" TabMoreMissing "未引用" "未被引用的文章" TabMoreOrphans "預設文章" "已預設內容的隱藏文章" TabMoreShadowed>>

    .

    加速 TiddlyWiki 運作的其他選項

    底下還有其他 加速 TiddlyWiki 運作 的選項, 但『不見得適用於每一個人』就是了 ……

    調整使用的套件 (plugin)

    開啟『預設文章』- PluginManager, 可以看到每個 plugin 的大小和載入時間, 再依此調整使用的套件。在我自己這邊, plugin 載入時間 都在 0 ~ 5ms, 所以下面提到的『使用外部 js 檔的方式安裝套件』, 看來就沒有這麼迫切的需求。

    文件體積822K,變得特慢

    2.移除非必要套件、盡可能使用外部 js 檔的方式安裝套件
    於 MarkupPostBody 宣告欲載入的套件:
    <script type="text/javascript" src="/pathto/YourPlugins.js"></script>

    .

    調整存檔方式

    偏好設定的『儲存備份』和『自動存檔』這兩項, 也會影響 TiddlyWiki 運作的效能, 但和『文件保全』比起來如何取捨, 就沒有一定的答案了。

    .

    8 意見:

    發表您的回應
    1. 匿名 提到...

      獲益良多,謝謝你喔

    2. admin 提到...

      http://newrealities.com/articles/2016/10/06/ufo-pioneer-leaves-the-planet

      Search engine optimization (SEO) or Indonesian SEO is the process of influencing the visibility of websites or web pages in search engine results - often referred to as "natural", "organic" or "earned" results. In general, the earlier (or rank higher on search results pages), and more often sites appear in the list of search results, the more visitors will receive from search engine users, and these visitors can be converted to customers.

      SEO can target various types of searches, including image search, local search, video search, academic search, news search and industry-specific vertical search engines.

      Indonesian SEO

      Specialist SEO.com is an Indonesian SEO Service launched in 2011 when search engines were in the early stages of developing their algorithms, Google was a big company that was very promising. Search engine optimization (SEO) has a completely different meaning. Since then many things have changed and internet marketing has become a necessity for every company that wants to survive in the online world competitively.

      Specialist SEO Indonesia SEO Services deal with Web Marketing technology from the start. After hours of research and development, trial and error, we can now offer the most reliable solutions in the world of Digital Marketing.

      Indonesian SEO Service

      You can chat, video call, phone, view photos, have fun, and even meet!
      online datingsite, online dating indonesia, free online dating, best online dating site free, online dating app, online dating terbaik, dating online chat, situs online dating, free dating sites without payment, dating online with video call, dating, meet me, meet, people nearby, soulmate, heart, online dating apps, free online dating, video call, audio chat, find your partner, setipe, skout, flurv, bigo live, Tinder, OkCupid, Hookup, BeeTalk
      online dating site

    3. admin 提到...

      Welcome to asetqq.vip, the Best and Most Trusted Indonesian Online Poker Site. AsQQQ provides 6 games that can be played in 1 User Id only. Online Poker, DominoQQ, Bandar Ceme, Capsa Susun, Live Poker, Ceme Keliling Games, using Indonesian real money
      poker online

      jdk88.id/ is the jadwal bola, first trusted online betting agent in Indonesia that provides live baccarat, roulette and sicbo online services. Giving customer satisfaction and serving better than others.
      Always determined to be able to serve customers better. Trying to remain a Soccer Agent, Casino Agent, the best and most trusted Online Betting in Indonesia
      Jadwal bola

      Onekartu is a trusted online poker agent Site. Original Money Poker uses IDNPlay servers that are 100% proven trusted and fairplay. Deposit and Withdraw Process in Crotqq start from 10 thousand rupiah and with fast and safe process. Customer Service Crotqq is available 24 hours to help you if you are having problems. onekartu.net is always trying to become a trusted online poker agent for those of you who want a Fairplay Poker game.

      poker uang asli

      TRUSTED !! POKER ONLINE | POKER AGENT | ORIGINAL MONEY POKER SITE
      RELIABLE MurniPoker Online Poker Site Category that provides poker games for real money, Ceme Online, and Domino Online
      This Site Is Engaged in Online Gambling.
      ENJOY THE BIGGEST BONUS SENSATION IN MURNIPOKER
      MurniPoker is the most attractive Poker Gambling site and many enthusiasts of Lapak303 online poker lovers.
      By ensuring the game is fairplay and has sophisticated technology, games are provided like
      Dominoqq, Capsa Susun and many others, we have become one of the best and trusted in Indonesia
      plus more available Ceme Online million rupiah jackpot that you can win every day.

      Poker Online

      happydomino is also the best and trusted Online Domino Poker site in Indonesia which has been proven by reputation and gained the trust of International Online gambling. Both the review of reputable poker sites and the quality of the games we provide do not need to be doubted. By providing the best service and providing assistance that is not complicated and we will provide an explanation that is as easy as possible so that you can easily understand it. We also provide playing tips and tricks so you can easily win in the best online gambling agent games in Indonesia. happydomino is guaranteed to be the fair play 100% online gambling site. There are no Robots in pure games Member vs Member. Our site is also equipped with the most sophisticated security system that is always updated on online gambling issues.

      poker online

      POKERSEJATI is a Poker site We provide interesting online game variants. You can access all of these games practically using just one account.

      situs poker

    4. slot games free play 提到...

      Thank you for the helpful post. I found slot games download full version your blog with Google and I will start following. Hope to see new blogs soon.

    5. SCR888 Cafe 提到...

      I would be grateful if you continue scr888 free game with the quality of what we are doing now with your blog ... I really enjoyed it
      Good writing...keep posting dear friend

    6. 3win8 提到...

      Thanks nice comparative 3win8 malaysia description.

    7. Edward Sosa 提到...

      NIce article this article has been my mega888 hack favorite, interesting and informative article.

    8. Goaloo 提到...

      Cek score Bola Hanya di http://goaloo.co.id/

    張貼留言