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 198337 - Slow CSS code completion - CssIndex.getAllDependenciesGraph()
Summary: Slow CSS code completion - CssIndex.getAllDependenciesGraph()
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: CSS Visual Tools (show other bugs)
Version: 7.0.1
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-05 11:14 UTC by Marek Fukala
Modified: 2011-05-06 05:08 UTC (History)
0 users

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 Marek Fukala 2011-05-05 11:14:20 UTC
Extracted from the original issue 197270 with many invalid duplicates (reports with no relation to the css completion).

There's one report (from the two I found in the many irrelevant) really showing the css completion problem:

http://statistics.netbeans.org/exceptions/exception.do?id=461067

The problem has been already described in the original issue:

Caused by very slow Windows disk IO 

FileUtil.toFileObject() ~ 22ms
FileObject.getFileObject() ~ 15ms

Since these are called quite frequently during computing the current file
dependencies graph the result is that the completion is slow.

Easiest way to fix this problem is to cache the dependencies graph for the
edited file and invalidate it only if the index result changes (some of the
deps. changed).
Comment 1 Marek Fukala 2011-05-05 13:03:57 UTC
fixed in web-main
Comment 2 Marek Fukala 2011-05-05 13:04:52 UTC
fixed in web-main#bc4aeb509e88 by implementing a cache for the getAllDependenciesGraph() method. The cache is invalidated when any of the dependencies in the indexer scope changes.
Comment 3 Quality Engineering 2011-05-06 05:08:13 UTC
Integrated into 'main-golden', will be available in build *201105060000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/bc4aeb509e88
User: Marek Fukala <mfukala@netbeans.org>
Log: #198337 - Slow CSS code completion - CssIndex.getAllDependenciesGraph()