Path: utzoo!attcan!uunet!xwind!ron From: ron@xwind.UUCP (Ronald P. Hughes) Newsgroups: comp.windows.x.motif Subject: Re: Optimization / Speedups Message-ID: <394@xwind.UUCP> Date: 16 Aug 90 17:13:48 GMT References: <9007@uhccux.uhcc.Hawaii.Edu> Reply-To: ron@xwind.UUCP (Ronald P. Hughes) Organization: CrossWind Technologies, Inc., 6630 Highway 9, Suite 201, Felton, Ca. 95018 Lines: 26 In article <9007@uhccux.uhcc.Hawaii.Edu> john@quonset.cfht.hawaii.edu (John Kerr) writes: >Are there any general hints for speeding up a Motif application? For >instance, does eliminating the resource file and hard-coding the >resources make for faster startup and execution? > ... >BTW, we are running HPUX on HP9000/300 series computers. We have the >latest X server from HP and are running Motif 1.0. Some machines (yours included) have an alternate malloc library available. If you use it you may see your application run twice as fast (no kidding). With some of the older versions of malloc, all allocated blocks remained linked in a single linear linked list. Each time a new block is allocated, all previously-allocated blocks are checked to see if they are now free and big enough to satisfy the request. X, and the intrinsics, and Motif, all allocate lots and lots and Lots and LOTS of little chunks of memory. Not only does that make the list very long, but think of how it affects paging performance to fondle 98% of your data pages every other millisecond! A/UX also suffers from an old malloc (although their alternate malloc library is buggy). Sun machines seem to have a decent standard malloc. Ronald P. Hughes ron@xwind.com (or ...!uunet!xwind!ron) CrossWind Technologies, Inc. 408-335-4988 "Malloc: if it was good enough in '77, it's good enough today!"