<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
    主站蜘蛛池模板: 亚洲免费日韩无码系列 | 四虎影视永久免费观看地址| 亚洲AV日韩精品久久久久| 亚洲国产精品久久| 两个人看的www免费视频中文| 亚洲伊人久久综合中文成人网| 国产精品无码亚洲一区二区三区| 好吊妞在线成人免费| 国产在线19禁免费观看| 亚洲香蕉成人AV网站在线观看| 亚洲中文久久精品无码1| 免费看h片的网站| 久久亚洲国产成人影院| 全免费一级午夜毛片| 久久狠狠高潮亚洲精品| 两性色午夜视频免费播放| 国产美女无遮挡免费视频| 黄色a三级免费看| 亚洲综合色成在线播放| 久久久久久影院久久久久免费精品国产小说| 免费鲁丝片一级观看| 春暖花开亚洲性无区一区二区| 亚洲?V乱码久久精品蜜桃| 久久久久久av无码免费看大片| 成人免费无毒在线观看网站| 亚洲乱码av中文一区二区| 中文字幕亚洲免费无线观看日本 | 亚洲黄片毛片在线观看| 国产无限免费观看黄网站| 亚洲人成在线电影| 美女被免费视频网站a国产| www成人免费视频| 热99re久久精品精品免费| 香蕉视频免费在线播放| 久久亚洲免费视频| 欧美大尺寸SUV免费| 亚洲天堂2016| 免费精品国偷自产在线在线| 亚洲国产成人无码AV在线影院 | 亚洲精品美女在线观看| 无码中文字幕av免费放dvd|