<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 閱讀(828) 評論(0)  編輯  收藏 所屬分類: EclipseProgramming
    主站蜘蛛池模板: 日韩亚洲国产综合高清| 亚洲男人的天堂在线| 亚洲 无码 在线 专区| 免费在线观看a级毛片| 国产精品亚洲w码日韩中文| 亚洲爆乳精品无码一区二区三区 | 亚洲一区二区三区在线观看网站| 亚洲另类无码专区丝袜| 一级毛片免费毛片毛片| 国产一精品一av一免费爽爽| 国内精自视频品线六区免费| 无码日韩人妻av一区免费| 亚洲Av无码国产情品久久| 亚洲毛片在线免费观看| 久热中文字幕在线精品免费| 亚洲精品麻豆av| 亚洲国产成人精品无码区在线网站| 自拍偷自拍亚洲精品播放| 国产精品免费大片一区二区| 国产福利在线观看免费第一福利| 亚洲日本久久一区二区va| a毛片在线免费观看| 成人黄页网站免费观看大全| 亚洲国产精品成人久久| 亚欧日韩毛片在线看免费网站| 国产一级淫片a视频免费观看| 亚洲成人黄色在线观看| 免费播放在线日本感人片| 国产一区二区三区免费视频| 九九九精品视频免费| 亚洲AV乱码久久精品蜜桃| 青青久久精品国产免费看| 免费精品国产日韩热久久| 亚洲AV无码一区二区三区DV| 日本最新免费网站| 亚洲AV噜噜一区二区三区 | 中文在线观看永久免费| 免费看一级做a爰片久久| 99精品视频在线观看免费| 亚洲一区在线视频观看| 国产精品久久永久免费|