Fixing Common Performance Issues with TAdvCircularProgress Components
TMS Software makes the TAdvCircularProgress component for Delphi [1, 2]. It is a great tool to show loading states [2]. It looks like a rotating circle [2]. Sometimes, this component can slow down your app. It can cause jerky animation or high CPU usage. Here is how to fix the most common speed problems. 1. Reduce the Frame Rate
The component redraws itself many times per second. If it redraws too fast, your computer works too hard. The Problem: The Interval property is set too low.
The Fix: Find the Interval property in the Object Inspector. Change it to a higher number like 50 or 60. This lowers the frames per second. The animation will still look smooth, but it uses much less power. 2. Turn On Double Buffering
When a computer draws a shape directly to the screen, you might see a flicker. Flickering slows down the visual performance.
The Problem: The control redraws pixel by pixel right on the screen.
The Fix: Set the DoubleBuffered property of the component to True. You can also set it on the parent Form. This makes the computer draw the circle in hidden memory first. Then, it flips the finished picture onto the screen all at once. 3. Hide the Component When Not in Use
An invisible loading spinner should not take up computer power. But sometimes, it keeps spinning in the background.
The Problem: The component is not visible, but the animation timer is still running.
The Fix: Always set the Active property to False when the loading task finishes. Do not just change Visible to False. Turn off Active first, then hide it.
// Correct way to stop the component AdvCircularProgress1.Active := False; AdvCircularProgress1.Visible := False; Use code with caution. 4. Avoid Complex Glow Effects
The component allows you to add custom styles. Some styles require a lot of extra math for the computer to draw.
The Problem: Using heavy shadows, blur, or complex gradients on the spinning segments.
The Fix: Stick to solid colors for the steps and the background. Clean lines draw much faster than blurry glow effects. To learn more about your specific project, tell me: What version of Delphi are you using? Is this for a Windows app or a mobile app?
How many of these components are on the screen at the same time? I can give you code examples tailored to your exact setup.
Leave a Reply