Bug #11462 2007-06-26 23:04

rickg22

Opening large files (~4MB) freezes CB for 4 secs

Bug is caused by the parsing of the source file for functions in the code completion toolbar.

It doesn't matter if it's a CPP file or not, it parses the files anyway. (Note: For some languages like VB or PHP the behavior is good, but the slowdown remains).

The slowdown is caused by the parser parsing the file in the main thread. The parser model needs to be updated to use only the specified filetypes, to skip files bigger than a certain threshold, and to parse in the background, either with events or threads.

Category
Plugin::CodeCompletion
Group
 
Status
Closed
Close date
2010-10-16 01:35
Assigned to
loaden
mandrav 2007-06-28 09:34

I wouldn't be so certain that the code-completion parser is the culrpit here. Have you done any measurements that prove this?

I would also check other parts of the file loading process, like encoding detection. It's not optimized yet and may slow down file loading a lot in certain cases...

rickg22 2007-06-28 13:49

I checked with CC enabled and with CC disabled. I used a 4MB PHP file with various functions declared. I copied and pasted several times to get around 40,000 lines of code, saved, closed, then opened. The file doesn't belong to any project.

With CC disabled, the delay is around 1 sec. With CC enabled, it's much more. The screen doesn't update and if you move the window it goes all white, until the parsing has been done.

loaden 2010-10-16 01:35

This bug has been already fixed in HEAD.

Thank you.