• 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
Make NSTextView a binary editor : performance issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make NSTextView a binary editor : performance issues


  • Subject: Make NSTextView a binary editor : performance issues
  • From: Julien Palmas <email@hidden>
  • Date: Thu, 28 Jul 2005 17:12:04 +0900

I would like to use an NSTextView to display binary data, just like a hex editor would do.

The data I want to load is big enough to cause performace issues.

My first problem, is how to get a suitable object that would represent the data bytes and provide it to the NSTextView.
The only way I found was :
instanciate an NSData object thank to -[NSData dataWithContentOfFile:]
get the [data descritpion] as a nsmutablestring
remove the last and first characters (< >)
give this string to the NSTextView via the "value" binding


Correct me if I'm wrong, but I get a strong feeling that this is absolutely not the best way to do ;-)

Then, the second issue is the time the NSTextView takes to load and display this string. For short strings, it is obviously instantaneous. But for bigger ones, I get the famous beach ball ......

I am using another hex editor for my personal use (this hex editor used NSTextView as well), and what ever the size of the data I feed it, the load is instantaneous (with the data formated, while the string I provide is abolutely not fromated)!!

What kind of performance tweaks could i use to achieve something very reactive?

I though about multithreading my app, but after running bigtop on my other hex editor, I can see that this application is also
single threaded.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Mixing C++ with Obj C - another question
  • Next by Date: Re: Custom line breaking in NSTextView
  • Previous by thread: Re: Mixing C++ with Obj C - another question
  • Next by thread: CoreData and NSCalendarDate/NSDate attributes
  • Index(es):
    • Date
    • Thread