• 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
Re: NSDocument's Open File Panel unresponsive when opening large file from disc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocument's Open File Panel unresponsive when opening large file from disc


  • Subject: Re: NSDocument's Open File Panel unresponsive when opening large file from disc
  • From: Gilles Celli <email@hidden>
  • Date: Mon, 28 Jan 2013 16:25:14 +0100

Thanks Mike,

I just looked with Instruments and well yes to process the data my app uses NSScanner a lot to extract date/time with its corresponding data values,
so this takes about 99,6% Running-Time (gasp! )…

One error (I think) was that I processed the data inside the readFromURL:ofType:error: after it was read into the NSString….but:

Now I pass the NSString fileContent from NSDocument makeWindowControllers to a new object WindowController:
It doesn't change anything however, the corresponding WindowController which processes now the data is also taking a lot of CPU-time…

Should I put the data processing  in a dispatch_sync queue in the WindowController or in NSDocument's makeWindowController ?

Gilles




On 28 Jan 2013, at 14:21, Mike Abdullah wrote:

>
> On 28 Jan 2013, at 13:18, Gilles Celli <email@hidden> wrote:
>
>> Hi,
>>
>> I've the following problem on OS X 10.6 and later:
>>
>> My document based app (reads some small and big (150MB or more) ASCII files to process data, I'm using the method:
>> readFromURL:ofType:error: and returning canConcurrentlyReadDocumentsOfType: to YES.
>>
>> When trying to open a bigger file the "Open File Panel" (window) gets unresponsive (stays open)  for several seconds.
>> For the smaller files the Open File Panel just disappears after clicking the "Open" button, as expected.
>>
>> Are there any solution to hide immediately the "Open File" panel after clicking the "Open" button in an document based app ?
>>
>> Any help is greatly appreciated.
>
> Fire up Instruments and find out what's actually happening while the app is unresponsive. Measure or you're just shooting in the dark.
>


_______________________________________________

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: NSDocument's Open File Panel unresponsive when opening large file from disc
      • From: Mike Abdullah <email@hidden>
References: 
 >NSDocument's Open File Panel unresponsive when opening large file from disc (From: Gilles Celli <email@hidden>)
 >Re: NSDocument's Open File Panel unresponsive when opening large file from disc (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: NSDocument's Open File Panel unresponsive when opening large file from disc
  • Next by Date: Re: NSDocument's Open File Panel unresponsive when opening large file from disc
  • Previous by thread: Re: NSDocument's Open File Panel unresponsive when opening large file from disc
  • Next by thread: Re: NSDocument's Open File Panel unresponsive when opening large file from disc
  • Index(es):
    • Date
    • Thread