FAQ - danielep71/VBA-Performance_Manager GitHub Wiki

FAQ

This page answers common questions about cPerformanceManager.

What is cPerformanceManager?

cPerformanceManager is a VBA class for Windows that provides:

  • multiple timing backends
  • session-bound elapsed-time measurement
  • numeric and formatted elapsed output
  • diagnostics
  • pause helpers
  • shared Excel time-waster suppression
  • structured checkpoint and reporting helpers

It is designed for instrumentation, benchmarking, and performance-aware Excel/VBA execution control.

Do I need any companion module?

Yes.

The current documented class design requires:

  • M_cPM_TIMEWASTERS.bas

What is the recommended timing method?

Use method 5, which is:

  • QueryPerformanceCounter (QPC)

What is the difference between ElapsedSeconds and ElapsedTime?

ElapsedSeconds

Returns a numeric Double.

ElapsedTime

Returns a formatted string.

Use the first for logic, the second for reporting.

What is TW suppression?

TW stands for “time-wasters” in the performance-control sense.

The class can participate in shared suppression of Excel Application behaviors such as:

  • ScreenUpdating
  • EnableEvents
  • DisplayAlerts
  • Calculation
  • Cursor

This is useful both for:

  • cleaner benchmark runs
  • faster ordinary workbook automation even when no elapsed time is being measured

Can I use the class without measuring elapsed time?

Yes.

You can use it only for:

  • TW suppression
  • pause helpers
  • diagnostics
  • structured cleanup

What are checkpoints?

Checkpoints are structured sub-measurements inside one timing session.

They let you capture:

  • a checkpoint name
  • an optional note
  • delta time since the previous checkpoint
  • cumulative time since StartTimer

The report can then be exported through:

  • ReportAsArray
  • ReportAsText

When do I need ResetEnvironment?

Treat ResetEnvironment as the main cleanup contract.

Call it:

  • in normal flows
  • in error-cleanup paths
  • after TW participation
  • after method 3 timing when timer-resolution changes may have been enabled

Is Pause a precision scheduler?

No.

Pause is a utility for demos, tests, and simple waiting strategies. It is not a substitute for high-precision scheduling.