|
|
|
[
Permlink
| « Hide
]
Dmitry Jemerov - 20 Aug 08 12:12
Please take a CPU snapshot while performing these changes, as described in http://support.jetbrains.com/kb/entry.jspa?externalID=192&categoryID=5
The problem visible in the snapshot isn't related to "Compare with Clipboard" - rather the problem is with JSP include processing triggered from the "Redundant cast" inspection.
I'm attaching a different CPU snapshot which may shed some light on the problem.
1. I chose two different JSPs to Compare with Clipboard. (this CPU sluggishness only occurs when Diff'ing JSPs – ad hoc testing never shows a problem comparing two Java classes) 2. All I did in the Diff screen was add 4 spaces (to force a re-compare). It took about 15-18 seconds to return control and show the newly added 4 spaces. I should also mention that my PC now has 6GB of memory.
More info: I tried Compare with Clipboard with two relatively smaller JSPs and didn't experience the sluggishness I noticed with the two larger JSPs.
The problematic JSPs are about 2000 lines long and include a mixture of JSP scriptlets, JSP expressions, Javascript, HTML, some JSP @ includes. It's horrible code. My theory – the sluggishness I see in the Compare with Clipboard is because it blocks when trying to re-evaluate/analyze the code in order to display the tick marks on the right side. I noticed that any changes to the JSP in normal edit mode (not Compare with Clipboard) show nearly the same amount of time to finally display the "little red box" (or yellow box or green box in the upper right part of the screen). The main difference is – I can keep editing the JSP without any delays (although I won't know the results of the code analysis). In the Compare with Clipboard screen, every edit blocks until a full analysis is done on the code. Given a choice, when I am doing a Compare with Clipboard, I am much more concerned with the Diff-related tick marks and not the Java code syntax related tick marks. The reason I am using Compare with Clipboard in my case is precisely because this code is horrible – I am trying to refactor it down to size and otherwise improve it. Because Compare with Clipboard blocks on all edits, I almost have to split the window and do manual comparisons and edits (because normal JSP editing does not block). Hope that helped. |
|||||||||||||||||||||||||||||||||||||||||||||||