<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    kukooBlog

    look to the master, follow the master, walk with the master, see through the master, become the master.

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      213 隨筆 :: 0 文章 :: 285 評論 :: 0 Trackbacks

    這是在eclipsepowered上看到的。 Ed提到了eclipse-dev committers mailing list中,Jerome Lanneluc 指出的一個String#substring和String(String)的問題。按照Jerome的說法,使用String#substring()的時候,原有的長字符串所占據的空間仍然被占據,并沒有釋放,使用String(String)可以解決這個問題。Jerome的原文:

    I just noticed that String#substring(…) shares the underlying char array. So if you have a big string, take a substring of it, throw away the big string, you will still hold on the big char array. A simple way to solve this is to make a copy of the substring using the String(String) constructor.

    I saved 550KB in JDT Core by changing the following code:

    String simpleName =
    fullyQualifiedName.substring(fullQualifiedName.lastIndexOf(
    '.'));

    to

    String simpleName = new
    String(fullyQualifiedName.substring(fullQualifiedName.lastIndexOf(
    '.'))); 

    Eclipse3.1發布以后,使用者發現,3.1占據了大量的Heap(大約200-300M)。Eclipse的開發小組正在不斷地解決這個問題,而String#substing的改進,將在Eclipse 3.1M6中發布(4月1日)。

    這個提示,其實也可以運用在我們自己的項目之中

    [Note: This blog was migrated from my old CSDN blog.]

    為什么重發這個blog呢?因為昨天看到Eclipse.org網站上關于Eclipse Performance的一個文檔。這份文檔主要是提示,在開發基于Eclipse的應用時(不管是Eclipse程序本身,還是Plug-in),在性能問題上需要注意的一些地方。其中,第一條就是如何使用substring()的問題。Eclipse 3.1M7以及RC1,都已經進行了這方面的調整,所以現在的Eclipse,對Heap的占用已經大幅減少,從而在性能上也有所提高。




    Eclipse.org
    eclipsepowered.org

    Email this store to a friend (send a short email with a subject to this story)
    Subscribe to kukooBlog (subscribe kukooBlog's RSS feed)
    Send me feedback on this story

    Yourit
    Mycat EclipseProgramming

    posted on 2005-06-03 09:04 kukooBlog 閱讀(822) 評論(0)  編輯  收藏 所屬分類: EclipseProgramming
    主站蜘蛛池模板: 日韩在线天堂免费观看| 国产va免费精品观看精品| 国产精品国产免费无码专区不卡| 亚洲高清不卡视频| 久久久久久成人毛片免费看| 亚洲精品亚洲人成人网| 99在线免费视频| 久久亚洲国产精品一区二区| 国产成人AV免费观看| 亚洲精品无码永久在线观看你懂的 | 在线亚洲精品视频| 国产裸模视频免费区无码| 亚洲乱亚洲乱妇24p| 成在线人永久免费视频播放| 国产精品亚洲专区在线播放| 国产又大又长又粗又硬的免费视频| 成人婷婷网色偷偷亚洲男人的天堂| 全部免费毛片在线| 精品人妻系列无码人妻免费视频 | 无码国产精品一区二区免费| 亚洲日本乱码一区二区在线二产线| 91视频国产免费| 久久亚洲欧美国产精品| 亚洲AV无码一区二三区| 99麻豆久久久国产精品免费 | 亚洲喷奶水中文字幕电影| 无码中文字幕av免费放| 久久精品国产亚洲av品善| 亚洲一级黄色视频| 日韩在线不卡免费视频一区| 亚洲国产中文在线二区三区免| 影音先锋在线免费观看| 国产免费久久精品99久久| 婷婷精品国产亚洲AV麻豆不片| av大片在线无码免费| 国产亚洲成在线播放va| 亚洲成在人线av| 成人最新午夜免费视频| 一个人看的www在线免费视频 | 欧洲美熟女乱又伦免费视频| 国产精品福利在线观看免费不卡|