Article View: comp.windows.interviews
Article #540Re: Patch reallocate and Patch redraw.
From: Mark Linton
Date: Thu, 27 Aug 1992 16:43
Date: Thu, 27 Aug 1992 16:43
29 lines
1802 bytes
1802 bytes
In article <9208250426.AA26138@sparc0.brc.uconn.edu>, sriram@brc.uconn.edu (Chittathoor M. Sriram) writes: |> I have an application in 3.0 in which I append a large number of |> components in Page Glyph which is inside a Patch object. |> |> Inside my program I also dynamically append components to the page and |> then do the following: |> |> patch->reallocate(); |> patch->redraw(). |> |> This works fine but it was very slow as it did a redraw of every |> component. |> |> I tried out the same application by just calling patch->reallocate() |> after appending dynamically the components to the page. |> The result was a gain in speed. |> |> What I am wondering is if the call to patch->redraw() is necesary as |> even without that it seems to be working. |> |> I dont understand why the call to patch->redraw() is necessary |> if just calling patch->reallocate() seems to do the job. |> |> Will there be any side effects. Patch::redraw will definitely redraw the entire page. Patch::reallocate is sufficient here because the Page will damage the changed areas during its allocation. If you were using some other aggregate, such as a box, a reallocate would not incur the appropriate damage.
Technical Details
Message-ID:
<p3piq9s@fido.asd.sgi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!sdd.hp.com!swrinde!mips!odin!fido!marktwain.rad.sgi.com!lintonReferences:
<9208250426.AA26138@sparc0.brc.uconn.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!sdd.hp.com!swrinde!mips!odin!fido!marktwain.rad.sgi.com!linton From: linton@marktwain.rad.sgi.com (Mark Linton) Newsgroups: comp.windows.interviews Subject: Re: Patch reallocate and Patch redraw. Message-ID: <p3piq9s@fido.asd.sgi.com> Date: 27 Aug 92 16:43:32 GMT References: <9208250426.AA26138@sparc0.brc.uconn.edu> Sender: news@fido.asd.sgi.com (Usenet News Admin) Reply-To: linton@marktwain.rad.sgi.com (Mark Linton) Organization: sgi Lines: 29