• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSImage initWithContentsOfURL slowness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage initWithContentsOfURL slowness


  • Subject: NSImage initWithContentsOfURL slowness
  • From: Nirias <email@hidden>
  • Date: Sun, 3 May 2009 16:09:32 -0700

I am trying to grab an image from a network camera but performance is
horrible.  My code is:

NSLog(@"refreshImage");

url = [NSURL URLWithString:@"http://192.168.1.253/SnapshotJPEG?Resolution=640x480&Quality=Precision";];
NSLog(@"  setURL");

NSImage *image = [NSImage alloc];
NSLog(@"  allocated image");

[image initWithContentsOfURL:url];
NSLog(@"  initialized from URL");  // Big pause before this log message

[imageView setImage:image];
NSLog(@"  done");


Occasionally this runs in about 1 second but usually there is a 10-20
second pause during the initWithContentsOfURL step.  I have verified
the camera is working just fine - Firefox and Safari reload the same
url instantaneously every time.

Any idea what I am doing wrong?

Thanks,  Nick
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSImage initWithContentsOfURL slowness
      • From: Nirias <email@hidden>
  • Prev by Date: Re: NSXMLParser frees itself on error?
  • Next by Date: Undo with NSTextView in HICocoaView
  • Previous by thread: Re: FTP Client Framework
  • Next by thread: Re: NSImage initWithContentsOfURL slowness
  • Index(es):
    • Date
    • Thread