Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Help

Hi,

I think, EFSHandle.exists() and all subsequent code under the IF block
can be omitted at all. Please correct me, if I'm wrong.

As for ExternalProjectFragment.getScriptFolder() shouldn't it just
return a handle of ExternalScriptFolder instead of looking at the
children list?

Michael

On 4/25/10, 赵忠伟 <zhaozhongwei@xxxxxxxxxxxxxxxx> wrote:
> Hi Macheal
>
> In method ElementHandler.handle():
>
> if (sourceModule == null) {
>                                         if (projectFragment.isExternal()
>                                                         ||
> projectFragment.isArchive()) {
>                                                 IScriptFolder scriptFolder =
> projectFragment
>
> .getScriptFolder(relativePath
>
>         .removeLastSegments(1));
>                                                 sourceModule = scriptFolder
>
> .getSourceModule(relativePath.lastSegment());
>                                         } else {
>                                                 IProject project =
> projectFragment.getScriptProject()
>
> .getProject();
>                                                 sourceModule =
> DLTKCore.createSourceModuleFrom(project
>
> .getFile(relativePath));
>                                         }
>                                         sourceModuleCache.put(resourcePath,
> sourceModule);
>                                 }
>
> when if (projectFragment.isExternal()|| projectFragment.isArchive()) is true
>
> EFSFileHandle.exists() will be called,this is a file operation,and I did not
> debug into
> DLTKCore.createSourceModuleFrom(project.getFile(relativePath));but
> I am sure it is time consuming too.So in my opinion the CA performance
> bottleneck is in the above code.
>
> I think you know this issue too,my patch is to get sourceModule lazily,and I
> think the other way is to get sourceModule effectively:)
>
>
>
> On Sun, Apr 25, 2010 at 2:21 PM, 赵忠伟 <zhaozhongwei@xxxxxxxxxxxxxxxx> wrote:
>
>> Hi Alex
>>
>>
>> If you have PDT installed,you can try to add ZEND framework to the pdt
>> include path/buildpath.
>>
>>
>> <?php
>> | // "|" is the cursor place,try ctrl+space
>>
>>
>> About *Hierarchy*,if we try to get type hierarchy in CA(even once),it will
>> take a very long time.
>>
>>
>> By the way,I do not think my patch is good either,so I ask your
>> suggestions:)I try to make the dltk code changes as few as possible,so now
>> the patch just looks like a patch of pdt.So I am very glad if dltk can
>> improve this natively.Thanks very much!
>>
>>
>>
>> On Sun, Apr 25, 2010 at 1:45 PM, Michael Spector <spektom@xxxxxxxxx>wrote:
>>
>>> Hi Zhao,
>>>
>>> I think IModelElement must be lazy already, so no file operations are
>>> expected during the code assist time.
>>> May be IO operations you're encountering are not necessary at all?
>>>
>>> Best regards,
>>> Michael
>>>
>>> On Sun, Apr 25, 2010 at 7:34 AM, 赵忠伟
>>> <zhaozhongwei@xxxxxxxxxxxxxxxx>wrote:
>>>
>>>> Hi guys
>>>>
>>>> There is a very annoying performance issue of PDT content assist,and I
>>>> open a bug
>>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=309422
>>>>
>>>> After I debug ,I found that it is very time consuming in
>>>> ElementHandler.handle to get ISourceModule(it seems that there are file
>>>> operations to get ISourceModule),so I create a patch that get
>>>> ISourceModule
>>>> when needed for content assist,and then the performance is improved much
>>>> more,I am not sure if there are better ways,so I am glad to hear your
>>>> voices!Because when there are 5000 proposals,it will cost more than 5
>>>> sec(longer than the default timeout)!So we have to fix this issue.
>>>>
>>>>
>>>> Thanks very much!!!
>>>>
>>>> --
>>>>
>>>> Thanks!
>>>>
>>>> Best Regards!
>>>>
>>>> Zhao
>>>>
>>>> _______________________________________________
>>>>
>>>> dltk-dev mailing list
>>>> dltk-dev@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> dltk-dev mailing list
>>> dltk-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/dltk-dev
>>>
>>>
>>
>>
>> --
>>
>> Thanks!
>>
>> Best Regards!
>>
>> Zhao
>>
>
>
>
> --
>
> Thanks!
>
> Best Regards!
>
> Zhao
>

-- 
Sent from my mobile device


Back to the top