title: Hundreds of accesses to "InputModeProperties.plist" are lagging my game (iPhone)
body: <p>I have a weird problem with a bugfix for Tiny Wings. In my game i use something like:</p>
  
  <pre><code>NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];      
  [userDefaults setFloat:musicVolume forKey:@"musicVolume"];
  </code></pre>
  
  <p>for saving some preferences and the highscore table. At the end of the game when the gameover screen appears the game saves the highscores to the standardUserDefaults. It works very well until the game displayed an UIAlertView like this:</p>
  
  <pre><code>UIAlertView *alert = [[UIAlertView alloc] init];
  [alert setTitle:@"Get ready!"];
  [alert setDelegate:self];
  [alert addButtonWithTitle:@"Ok"];
  [alert show];
  [alert release];
  </code></pre>
  
  <p>After the AlertView disappeared everytime the game save somthing to the standardUserDefaults the game lags for a while (on some devices for several seconds). This also happens after the game used an UITextField for inputting the player name. There is not any lag in the game before one of the two UIKit Elements are used but after the use of them the game lags  until i restart the app. I have analysed the problem with the Performance Tools and the "I/O Activity" Instrument shows that there are hundreds of "open - read - close" accesses to the</p>
  
  <pre><code>/System/Library/Frameworks/UIKit.framework/InputModeProperties.plist
  </code></pre>
  
  <p>which causes the lags.</p>
  
  <p>I totaly have no clue what to do. Any ideas?</p>
  
  <p><strong>Edit:</strong><br>
  there is a thread in the apple developer forum <a href="http://devforums.apple.com/message/424374#424374" rel="nofollow noreferrer">http://devforums.apple.com/message/424374#424374</a> where somebody has an equal problem and it seems that it only appears with iOS 4.3. I have tested it and the lags only happens on my 4.3 devices (not on a 3.1 iPod Touch and 4.2 iPad).</p>