home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!mcsun!sunic!kth.se!cyklop.nada.kth.se!d88-jwa
- From: d88-jwa@cyklop.nada.kth.se (Jon WΣtte)
- Subject: Re: More on TCL Nightmare.....................................
- Message-ID: <1993Jan23.234716.1435@kth.se>
- Sender: usenet@kth.se (Usenet)
- Nntp-Posting-Host: cyklop.nada.kth.se
- Organization: Royal Institute of Technology, Stockholm, Sweden
- References: <93019.113451REE700A@MAINE.MAINE.EDU> <1993Jan22.010015.17871@netcom.com> <93023.121559REE700A@MAINE.MAINE.EDU>
- Date: Sat, 23 Jan 1993 23:47:16 GMT
- Lines: 43
-
- In <93023.121559REE700A@MAINE.MAINE.EDU> REE700A@MAINE.MAINE.EDU writes:
-
- > Now, this amounts to 60,000 LongRects (hence 240,000 LongInt assigns,
- >and 120,000 LongInt adds, so the math of generation is non-negigible.
-
- >FillRect'ed them.
-
- > A simple scroll - refresh took 10 seconds on my SE/30 ! Obviously,
- >this ain't no Quadra and it is a lot of drawing, but seriously...
-
- Add the data accesses for drawing each item, and for the stack
- to pass parameters to and fro, and the trap dispatcher, you'll
- get a pretty hefty memory dependency (what's the cycle per
- longword access in an SE/30? 120 ns?) PLUS you have a lot of
- instructions even to just determine where the LongRects are,
- do the trap, intersect with the window, clip, and maybe draw.
- I don't think 10 seconds is in any way unreasonable, considering
- what you're doing.
-
- > Any useful suggestions on how to speed this process up?
-
- Yes, it's very simple; your Draw() method gets a Rect passed
- to it; that Rect contains the area that actually needs to
- be drawn. I don't know what data structures you have, but
- some simple binary search over sorted coordinates, or some
- other clever way of knowing what rectangles to draw without
- checking each and every one would probably help tremendously.
-
- > BTW - HOW DO I GET THE DEBUGGER INTO THE EVENT HANDLING PORTION OF
- > MY APPLICATION WITHOUT MANUALLY SETING THE EVENT MESSAGE?
-
- Uh? You mean break when getting an event, or just look at
- a place in the code?
-
- Open the relevant part in Think C, highlight a line you want
- to have in the debugger, and press "Debug" (cmd-I) and the
- debugger will go there.
-
- --
- -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
- _/~| Yellow
- / * \_ Shark (This signature has won the "Worst ASCII
- ~~~~\/ Software Logo of the Year" award)
-