From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ffe4fb1477fe67e6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: Newbie Needs Ada Advice References: <1178212418.538270.283700@c35g2000hsg.googlegroups.com> <1178635220.859690.3310@y80g2000hsf.googlegroups.com> <5abtplF2n3855U1@mid.individual.net> <1178650313.462774.91850@e51g2000hsg.googlegroups.com> <1178659640.093325.10510@y5g2000hsa.googlegroups.com> From: Markus E Leypold Organization: N/A Date: Wed, 09 May 2007 17:58:41 +0200 Message-ID: <6lvef2aszy.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:5VVfmBstZQHMHpUh8ATJZjiU98g= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.195.162 X-Trace: news.arcor-ip.de 1178725813 88.72.195.162 (9 May 2007 17:50:13 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feeder1.cambrium.nl!feed.tweaknews.nl!feed10.multikabel.net!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news1.google.com comp.lang.ada:15702 Date: 2007-05-09T17:58:41+02:00 List-Id: Jacob Sparre Andersen writes: > Markus E Leypold wrote: > >> Concerning pictures: I suggest you write them into a picture queue >> in the filesystem and don't pass them through the RPC >> interface. What you pass through the interface would just be the >> file names. > > File names are slow. Wouldn't it be more appropriate to keep the > currently relevant image(s) in a shared memory segment? Dependents on what you want to do. Probably not the whole 30 GB. My rule of thumb always is to do the elementary thing first and optimize later. In this case one could use the file storage (one use it anyway), introduce (when required) the shared memory for explicit caching (or perhaps play with memory mapping the file) and refine the get-the-image protocol appropriately. My gut feeling though is, to trust the file system cache of the machine to do the proper caching implicitely and there should be a good reason to think you can do better than that manually. Regards -- Markus