Xcode bogs down on copy/past

Discussion in 'Mac Programming' started by ender land, May 3, 2011.

  1. ender land macrumors 6502a

    Oct 26, 2010
    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;
    Is there something within that causing the problem?
  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    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?
  3. lloyddean macrumors 6502a

    May 10, 2009
    Des Moines, WA
    How much free space available on the boot drive, and what size drvie, before the paste operation?
  4. PatrickCocoa macrumors 6502a

    Dec 2, 2008
    Just for fun

    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.
  5. jiminaus macrumors 65816


    Dec 16, 2010
    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).
  6. ender land thread starter macrumors 6502a

    Oct 26, 2010

    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

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

    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.

Share This Page