How can I measure TForm deserialization time in Delphi?

Posted by mjustin on Stack Overflow See other posts from Stack Overflow or by mjustin
Published on 2010-03-14T12:27:57Z Indexed on 2010/03/14 12:35 UTC
Read the original article Hit count: 247

Filed under:
|
|

For performance tests I need a way to measure the time needed for a form to load its definition from the DFM. All existing forms inherit a custom form class.

To capture the current time, this base class needs overriden methods as "extension points":

  1. before the beginning of the deserialization process
  2. after the completion of deserialization (can be implemented by overriding the Loaded procedure)
  3. the moment just before the execution of the OnFormCreate event

Which TObject (or TComponent) methods are best suited? Maybe there are other extension points in the form creation process, please feel free to make suggestions.

© Stack Overflow or respective owner

Related posts about delphi

Related posts about deserialization