[1599] Code Cleanup broken ???

I'm working on a VB solution with Visual Studio 2008. I tried a code cleanup on a Windows forms module with around 5.000 lines of code. In opposite to earlier eap builds the cleanup cleanup is extremely slow. I canceled it after around three minutes. Next i tried to reformat just a selection of around 100 lines (one method). I configured the VB naming style to wrap long lines if they are longer than 132 charactes. I expected the method declaration to be wrapped as there are a lot of parameters, but nothing happens. I attached a screenshot of my naming style configuration.

Regards
Klaus



Attachment(s):
screenshot.png
5 comments
Comment actions Permalink

Hello Klaus
     We were not able to reproduce this behavior. Could you please send a small sample solution along with your code cleanup profile settings (a screenshot) to andrew dot serebryansky at jetbrains dot com? Thank you!

0
Comment actions Permalink

Hello Andrey,

sorry for the late response, but i was very busy the last few days. I tried to reproduce the problem with a small sample solution but it did not work. Unfortunately the code i'm working on is confidential so i can't send it to you.

The performance seems to decrease with the size of the file. A 5.000-line VB Form class was reformatted in around 2 minutes. I opened the solution with Visual Studio 2010 and did a code cleanup on the same form. The performance was not good but much better than on VS 2008 (around 30 seconds). My hardware is quite performant (a Laptop with Intel Core 2 Duo 2,8GHZ, 4GB RAM) so this should not be the bottleneck. On another PC with a Pentium D 3GHZ with 3 GB RAM i canceled the code cleanup of a 8.000 line vb class after 5 minutes. If it would help you i can try to profile Visual Studio while doing a  code cleanup.

By the way, i have noticed that the result of the cleanup is not as expected. I have configured Visual Studio to use Tabs for indenting code. After Code Cleanup all "End..." keywords are formatted with leading spaces instead of tabs (i have attached a sample screenshot). R# 4.5 has the same issue. I discussed this with Olga Lobacheva last year and she told me that it will be fixed in R# 5.0.

Regards
Klaus



Attachment(s):
CodeCleanup_Settings.png
CodeCleanup_Issue.png
0
Comment actions Permalink

Hello Klaus
     Could you please profile Visual Studio (you can find the instructions at http://www.jetbrains.net/confluence/display/ReSharper/ReSharper+Performance+Profiling+Instructions) and upload the snapshots to ftp://ftp.intellij.net/.uploads/? As to the problem with tabs, I've asked the corresponding developer to take a look.

Andrey Serebryansky

Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

Hello Andrey,

i have just uploaded a profiler log (made with DotTrace 4.0 EAP) to the FTP server. The file is named CodeCleanupPerformance.zip. I hope that the download was successful because i can't see the file in the server directory.

Regards
Klaus

0
Comment actions Permalink

Hello Andrey,

i just tested Code cleanup with build 1611. On VS 2008 the result is a little bit better than before. I used a 7000-line WinForm class (7000 lines without the .designer.vb part) for testing. Selected Options are:

Visual Basic .NET
   Optimize 'import' directives
   Shorten qualified references
   Reformat code

XML
   Reformat code

After a few seconds the progress dialog shows "around 5 minutes remains". A minute later it shows "Around 6 hours remains", but the reformat was completed in around 3 minutes.So the code cleanup is definitely not broken but very slow.

Doing the same on the same file in VS 2010 Beta 2, the cleanup took around 1 minute to complete.

Also, as i mentioned before, all of the lines starting with an "End..." keyword are formatted with leading spaces instead of leading tabs (as configured in the language options of the VS options screen).

Regards
Klaus

0

Please sign in to leave a comment.