PDA

View Full Version : Xcode bogs down on copy/past




ender land
May 3, 2011, 06:22 PM
Whenever I paste or delete the following excerpt within xcode, it gets unbelievably slow (probably 30 second time from "cmd v" to actually showing the text)


//add all times to that value
for (multimap<PathID, double>::iterator i = pathTimes.first; i != pathTimes.second; i++) {

if (temp == 0) {
firstPathID = (*i).first;
firstPathIDtime = (*i).second;
}

if (temp == 1) {

secondPathID = (*i).first;
secondPathIDtime = (*i).second;
}
temp++;
}



Is there something within that causing the problem?



chown33
May 3, 2011, 06:41 PM
A. Which version of Xcode?

B. What kind of file are you pasting into? .cpp, .mm, something else?

C. If you disable syntax coloring, does the problem disappear?

lloyddean
May 3, 2011, 09:43 PM
How much free space available on the boot drive, and what size drvie, before the paste operation?

PatrickCocoa
May 3, 2011, 10:55 PM
Just for fun I copied your code and pasted it into a project I had open. Xcode 4.0.2 Build 4A2002a, iMac 3.06 GHz core 2 duo, 2 TB hard drive with probably > 1TB free, syntax coloring on, pasting to the bottom of a .m file (before the @end).

No problems. Pasted in less than a second, same for cut.

jiminaus
May 3, 2011, 11:18 PM
If this is an issue with the syntax highlighter, then it wouldn't be this code per se, but the context in which the code is being inserted. I notice that it's really deeply indented (or at least for my style it is).

ender land
May 3, 2011, 11:33 PM
A. Which version of Xcode?

B. What kind of file are you pasting into? .cpp, .mm, something else?

C. If you disable syntax coloring, does the problem disappear?


A) 3.2 (or whatever the latest on 3 is)
B) it is a relatively lengthy .cpp file
c) I am not sure, I will check that


How much free space available on the boot drive, and what size drvie, before the paste operation?


Some 40GB worth of space (getting to the point I need a new drive!)


If this is an issue with the syntax highlighter, then it wouldn't be this code per se, but the context in which the code is being inserted. I notice that it's really deeply indented (or at least for my style it is).

Yeah it is fairly nested unfortunately as a result of a lot of logic :(

It is possible that the use of "i" as an iterator was causing problems as this was nested in another larger loop using the variable "i" in an alternate iterator.

Maybe xcode just goes insane trying to track the variables if you do this? STill seems weird to lag that badly.