I also noticed problems with ghex and large files. Is it a 32 or 64 bit CPU that you're using? I'm not sure ghex is designed to handle that big a file at all. Besides it ought to save to a temporary file and rename it over the original, just to be safe and avoid chomping your data anyway.
As for the performance with big files, mmap is the way to go. The attached patch demonstrates this. I tried it out on some fairly modestly sized files (600MB sort of ballpark) and the results were predictably spectacular. This patch is a bug-ridden hack but it might work for your case.
I started work on doing all this portably with glib. There's a way to do it without changing the UI behaviour but it's not a trivial one-nighter and my school homework + other things got in the way for now so...
I also noticed problems with ghex and large files. Is it a 32 or 64 bit CPU that you're using? I'm not sure ghex is designed to handle that big a file at all. Besides it ought to save to a temporary file and rename it over the original, just to be safe and avoid chomping your data anyway.
As for the performance with big files, mmap is the way to go. The attached patch demonstrates this. I tried it out on some fairly modestly sized files (600MB sort of ballpark) and the results were predictably spectacular. This patch is a bug-ridden hack but it might work for your case.
I started work on doing all this portably with glib. There's a way to do it without changing the UI behaviour but it's not a trivial one-nighter and my school homework + other things got in the way for now so...