Bug 443214 - Marking occurrences in file with big number of functions is slow
Summary: Marking occurrences in file with big number of functions is slow
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2014-09-03 08:56 EDT by Michal Niewrzal CLA
Modified: 2020-05-14 11:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Niewrzal CLA 2014-09-03 08:56:10 EDT
When file contains many functions marking function occurrences is slow. Example file has 2000 empty functions and after clicking into name (function declaration) it takes about 1-2 sec to highlight it.
 
This code will generate php file with 2000 empty functions:
<?php
$sTest = "<?php class CTest{\n";
for($i = 1; $i < 2000; ++ $i) {
	$sTest .= "function func$i(){}\n";
}

$sTest .= "function test(){}\n";

$sTest .= "} ?>";
file_put_contents ( 'CTest2.php', $sTest );

?>
Comment 1 Michal Niewrzal CLA 2014-09-04 04:39:25 EDT
Marking occurrences was slow for class members, especially for functions.

Small patch: https://git.eclipse.org/r/#/c/32836/
Comment 3 Sylvia Tancheva CLA 2015-05-22 06:23:07 EDT
Looks OK to me, Closing