Re: [Nautilus-list] Eel patch

Hi all,

> -eel_read_entire_file (const char *uri,
> -			   int *file_size,
> -			   char **file_contents)
> +eel_read_entire_file_with_limit (const char *uri,
> +				 int *file_size,
> +				 char **file_contents,
> +				 GnomeVFSFileSize max_size)

Has anyone considered that the implementations are time-consuming?
Would it not be easier to mmap the file? This would result in just
about NO reading except for memory page sized chunks that are
actually accessed by the application. If the application wants to
update the file, then mmapping is more efficient as well. By the
way, my experience of mmap is on Solaris, and I'm assuming that
Linux's implementation is entirely compatible.

Just my 2/100ths of a Euro worth.

Michael Myburgh

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]