This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 71366 - Do not search for localized/branded JARs if there is no locale folder
Summary: Do not search for localized/branded JARs if there is no locale folder
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 6.x
Hardware: All Linux
: P4 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2006-01-13 15:22 UTC by _ rkubacki
Modified: 2008-12-23 08:35 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ rkubacki 2006-01-13 15:22:03 UTC
If you run the IDE under strace you can see sequences of call like this one:

stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/org-netbeans-api-progress.jar",
{st_mode=S_IFREG|0644, st_size=99867, ...}) = 0
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/org-netbeans-api-progress.jar",
{st_mode=S_IFREG|0644, st_size=99867, ...}) = 0
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/locale/org-netbeans-api-progress_nb_en_US.jar",
0xb16eca64) = -1 ENOENT (No such file or directory)
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/locale/org-netbeans-api-progress_nb_en.jar",
0xb16eca64) = -1 ENOENT (No such file or directory)
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/locale/org-netbeans-api-progress_nb.jar",
0xb16eca64) = -1 ENOENT (No such file or directory)
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/locale/org-netbeans-api-progress_en_US.jar",
0xb16eca64) = -1 ENOENT (No such file or directory)
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/locale/org-netbeans-api-progress_en.jar",
0xb16eca64) = -1 ENOENT (No such file or directory)
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/locale/org-netbeans-api-progress.jar",
0xb16eca64) = -1 ENOENT (No such file or directory)
stat64("/opt/devel/nb/nb_all/nbbuild/netbeans/platform6/modules/patches/org-netbeans-api-progress",
0xb16eca8c) = -1 ENOENT (No such file or directory)

It might be easier to check for locale directory first. Usualy it is not there
and we can save 5 * 230 (#of modules) stat calls.
Comment 1 _ rkubacki 2006-01-13 16:34:02 UTC
/shared/data/ccvs/repository/core/bootstrap/src/org/netbeans/Util.java,v  <-- 
Util.java
new revision: 1.4; previous revision: 1.3

actualy four modules in nb cluster where we have locale so 5 * 226 calls avoided.
Comment 2 rbalada 2007-10-10 15:15:24 UTC
Yarda helped me debug an issue which has been introduced by a bugfix for this issue in NB 6.0 source base after 5.x
codeline have been branched.

Symptoms: NetBeans *IDE* shows main window title "NetBeans Platform 20071010" when I tried to put multilanguage
localized data into platform7/locale subdirectory. The incorrect title is loaded from jarfile
platform7/modules/org-netbeans-core-windows.jar while completely ignoring IDE branding jarfile found in different
cluster - nb6.0/modules/locale/org-netbeans-core-windows_nb.jar

Steps to reproduce:
$ cd /tmp
$ mkdir nb_all
$ cd nb_all
$ cvs -d:pserver:anoncvs@cvs.netbeans.org:/cvs co nbbuild
$ cd nbbuild
$ ant checkout
$ ant
$ mkdir netbeans/platform7/modules/locale
$ ant tryme


or simply 'mkdir netbeans/platform7/modules/locale' and restart your IDE.

Please redo/fix the fix for this issue.
Comment 3 rbalada 2007-10-10 15:20:19 UTC
Yarda asked me to asssign this issue to pnejedly :-).
Comment 4 Petr Nejedly 2007-10-10 15:32:37 UTC
Reassigning per agreement.
Comment 5 Jaroslav Tulach 2007-10-11 13:07:08 UTC
#71366: Reverting code that was overoptimized.

IDE:-------------------------------------------------
IDE: [11.10.07 14:06] Committing started
Checking in Util.java;
/shared/data/ccvs/repository/core/bootstrap/src/org/netbeans/Util.java,v  <--  Util.java
new revision: 1.13; previous revision: 1.12
done
IDE: [11.10.07 14:06] Committing finished

Making P4 again.
Comment 6 Jesse Glick 2007-10-23 23:26:14 UTC
You broke ModuleManagerTest with this patch. I have tried to fix the test while preserving the optimization.

Checking in Util.java;
/shared/data/ccvs/repository/core/bootstrap/src/org/netbeans/Util.java,v  <--  Util.java
new revision: 1.15; previous revision: 1.14
done
Comment 7 Lukas Hasik 2008-04-10 21:23:24 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 8 Jaroslav Tulach 2008-10-03 16:20:00 UTC
Pavel, I have a feeling you fixed this for 6.1, didn't you? If not, reassign back to me. Thanks.
Comment 9 Pavel Flaska 2008-10-07 11:50:35 UTC
Yes, this should be fixed. I've just tested current trunk build and there are no stat64 system calls.