From: Johannes G. <joh...@gm...> - 2007-06-27 21:41:50
|
On 2007.06.12 22:09:59 CEST, Johannes Gajdosik wrote: > On 2007.06.12 13:54:55 CEST, Fabien Chéreau wrote: > > Hi, > > > > Well done for the mmap patch. If we want to include that in the SVN, we > > should make sure that it is portable to other plateforms, and use a > > fallback if needed. > > There should be code in the CMakeLists.txt which check for mmap and define > > HAVE_MMAP in the config.h or something like that. > > We don't need HAVE_MMAP, because mmap exists everywhere. Even in Windows95, > although it is called differently. > > There are other problems: > > 1) smooth operation vs. having the data on disk. > Some people will prefer preloading of all data because this guarantees smooth operation > without disk access (provided you have enough RAM). > > 2) binary compatibility. > The current patch work only for little endian machines, and I am unsure about compilers > other than gcc. Well, this is not such a restriction: only the old Motorola G4 Macs > and Sun, Hp, SGI, Alpha machines are out of luck. Conversion to native binary format can be done > > A) before starting of stellarium > B) right after loading the data in stellarium > C) before rendering of each single star. > > Currently B is implemented, but this is not possible with mmap. > Maybe we will have to do both A and C. In any case it would be good to see how big > the performance drawback is of method C. > > Johannes I have committed a first version of the mmap patch. The restriction is that it currently works for little endian machines only, so users of G4-Macs are out of luck for now. Nigel, If you want something for your old Mac, I can do it for you. You just have to compile and test. In order to use the mmap feature you must write in stars.ini: cat_file_name_05 = mmap:stars_5_1v0_0.cat cat_file_name_06 = mmap:stars_6_2v0_0.cat cat_file_name_07 = mmap:stars_7_2v0_0.cat cat_file_name_08 = mmap:stars_8_2v0_01.cat So mmapping can be enabled/disabled for single files. The fallback is the current loading into main memory. I have implemented a windows version too, but was not even able to compile it, because I currently have no working crosscompiling environment. Yours, Johannes |