Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] is the isSyncrhonized() check in DLTKContentTypeManager.isValidResourceForContentType() needed? (and one other performance item)

Johan,

The first part seems to be related to the DLTKContentTypeManager#isValidResourceForContentType. 

This code is executed after file extension was not met - the next step is try to detect if the file is a script by content (most of the detection is done by the 1st line e.g. #!/usr/bin/ruby or #!/usr/bin/tclsh).

The isSynchronized() check is done before actually reading the resource content, it should not take too long but I will check.

The questions are: 
- do you have a lot of non .js files in the source folders?
- do you have any content describers for the javascript?

The second part: commented line in ValidatorRuntime is to compensate some missing functionality - I will take care of it on the next week.

Btw, what is the absolute value (I mean in seconds) of your 2.5 times faster?
I have never seen this code takes significant time when building ruby or TCL. 

Regards,
Alex

----- Original Message -----
From: "Johan Compagner" <jcompagner@xxxxxxxxx>
To: "DLTK Developer list" <dltk-dev@xxxxxxxxxxx>
Sent: Saturday, September 20, 2008 5:02:34 AM GMT +06:00 Almaty, Novosibirsk
Subject: [Dltk-dev] is the isSyncrhonized() check in DLTKContentTypeManager.isValidResourceForContentType() needed? (and one other performance item)



That isSynchronized() call in the if: 

// Check resources accessibility and synchronization 
if (!resource.isAccessible() 
|| !resource.isSynchronized(IResource.DEPTH_ZERO)) { 
return false; 
} 

is a hotspopt when i profile now a full build. 

and another thing is this one in ValidatorRuntime 

private static void initializeValidators() { 
ValidatorDefinitionsContainer validatorDefs = null; 
boolean setPref = false; 
synchronized (fgValidatorLock) { 
if (isInitialized) { 
// return; 
} 



why is that return disabled? Annotations do say that it is only called once but this is not the case 
it is called over and over again for every build. 

If i enable that return and comment that above if then my build is about 2.5 times faster 
so the question is do we really need to have a isSync call and why must the validators constantly be build? Arent those the same for a run of eclipse? 

johan 


_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top