我在 300 个联系人中遇到了同样的问题,大约花了 5 分钟。我打补丁后只需要10秒。
这是我的拉取请求:https ://github.com/phonegap/phonegap/pull/19
他们必须为每张图片生成一个临时文件,并且他们正在使用疯狂的循环来查找空闲文件路径。就像是 :
do {        
  filePath = [NSString stringWithFormat:@"%@/photo_%03d.jpg", docsPath, i++];       
} while ([fileMgr fileExistsAtPath:filePath]);
现在我使用mktemp,一切都更快了。
如果您不需要完整的分辨率图片,您也可以替换:
CFDataRef photoData = ABPersonCopyImageData(self.record);
经过 :
CFDataRef photoData = ABPersonCopyImageDataWithFormat(self.record, kABPersonImageFormatThumbnail);
希望对你有帮助!
编辑 :
每次启动应用程序时,IOS 都会刷新临时目录:
  您有责任删除您创建的任何临时文件。系统会在启动时清理它们,但这可能需要很长时间。
  
  来自:http ://cocoadev.com/wiki/NSTemporaryDirectory
如果您不想减慢应用程序的引导速度,则应始终使用基于联系人 ID 的相同文件路径。如果文件已经存在,您将节省清理和写入时间:
- (NSObject*)extractPhotos
{
    NSMutableArray* photos = nil;
    if (ABPersonHasImageData(self.record)) {
        //CFDataRef photoData = ABPersonCopyImageDataWithFormat(self.record, kABPersonImageFormatThumbnail);
        CFDataRef photoData = ABPersonCopyImageData(self.record);
        NSData* data = (__bridge NSData*)photoData;
        // write to temp directory and store URI in photos array
        // get the temp directory path
        NSString* docsPath = [NSTemporaryDirectory ()stringByStandardizingPath];
        NSError* err = nil;
        int recordId = ABRecordGetRecordID(self.record);
        NSFileManager* fileMgr = [[NSFileManager alloc] init];
        NSString* filePath = [NSString stringWithFormat:@"%@/photo_%03d.jpg", docsPath, recordId];
        BOOL hasImage = NO;
        if ([fileMgr fileExistsAtPath:filePath]) {
            hasImage = YES;
        } else if ([data writeToFile:filePath options:NSAtomicWrite error:&err]) {
            hasImage = YES;
        }
        if (hasImage) {
            photos = [NSMutableArray arrayWithCapacity:1];
            NSMutableDictionary* newDict = [NSMutableDictionary dictionaryWithCapacity:2];
            [newDict setObject:filePath forKey:kW3ContactFieldValue];
            [newDict setObject:@"url" forKey:kW3ContactFieldType];
            [newDict setObject:@"false" forKey:kW3ContactFieldPrimary];
            [photos addObject:newDict];
        }
        CFRelease(photoData);
    }
    return photos;
}
编辑(08/01/2013):仅供参考:合并到科尔多瓦:http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c6a1dbe3