[sldev] Silly suggestion - improved initial rez time
Tateru Nino
tateru.nino at gmail.com
Fri Jun 15 09:28:38 PDT 2007
Footnote....is it my imagination or is the viewer ALREADY writing that
texture list out to disk on exit?
Erik Anderson wrote:
> I have modified some windows applications of mine to do an mmap
> instead of fopen. One big thing you discover rather quickly is that
> you don't have to allocate memory for the files; it's also been
> described as the fastest way to access files on windows. The function
> isn't called mmap though, it's a combination of CreateFileMapping and
> MapViewOfFile.
>
> On 6/14/07, *Tateru Nino* <tateru.nino at gmail.com
> <mailto:tateru.nino at gmail.com>> wrote:
>
>
>
> Callum Lerwick wrote:
> > On Tue, 2007-06-12 at 12:02 +1000, Tateru Nino wrote:
> >
> >> Callum Lerwick wrote:
> >>
> >>> On Thu, 2007-06-07 at 13:28 +1000, Tateru Nino wrote:
> >>>
> >>>
> >>>> What if.... on logout, the viewer wrote out a list of
> currently loaded
> >>>> texture assets - the index of the memory cache?
> >>>>
> >>>>
> >>> Actually, after going over the audio engine, I'm beginning to
> think
> >>> caching uncompressed textures on the filesystem really is a
> good idea.
> >>> The audio engine currently caches uncompressed sounds on disk,
> but only
> >>> as long as the session.
> >>>
> >>> Don't cache them in RAM at all, any more than necessary. Let the
> >>> filesystem block cache do its job. I can't speak for windows,
> but on
> >>> unix systems this would be quite efficient and effective.
> >>>
> >>>
> >> You mean, basically, mmap() the whole lot and be done?
> >>
> >
> > I don't know how portable mmap() is, is windows at all capable
> of it?
> > Plain old fopen should be plenty fast. At least on unix systems.
> >
> Win32 does mmap(), with the exception that you can't (I am told) grow
> the file while it's mapped as you can on other systems.
> You have to unmap it first, grow it, then remap it.
>
> --
> Tateru Nino
> http://dwellonit.blogspot.com/
>
> _______________________________________________
> Click here to unsubscribe or manage your list subscription:
> /index.html
>
>
--
Tateru Nino
http://dwellonit.blogspot.com/
More information about the SLDev
mailing list