Xcode bogs down on copy/past

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

  1. macrumors 6502a

    Joined:
    Oct 26, 2010
    #1
    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)


    Code:
    				//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?
     
  2. macrumors 603

    Joined:
    Aug 9, 2009
    #2
    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. macrumors 6502a

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

    Joined:
    Dec 2, 2008
    #4
    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. macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #5
    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. thread starter macrumors 6502a

    Joined:
    Oct 26, 2010
    #6

    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