Make NSTextView a binary editor : performance issues
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