Multiple paint() components

I have created o plugin that has a plugin editor that containts a paint() function and a second component that is added in the editor with adAndMakeVIsible() that also contains a paitn() function called through a Timer so that paints with standard fps.
All the images are loaded using CreateCopy().
I also have checked the sizes so no resizing is applied.

When running it on Cubase, Nuendo, Reaper, opening 2 plugins starts causing lagging, and when going to 3-4 plugins it completely freezes.

Is it a valid option to have multiple components that use paint() or i should make a design that uses only one?

Avoid using createCopy method and use duplicateIfShared().
I guess Images are created inside the Editor or component. So no need to use Createcopy.

This was not the problem, as it was happening before adding the createCopy().
I tried adding it but didnt solve the issue.

It depends what you’re doing in those paint calls. Use a profiler to find out what the expensive operations are.

t0m thanks for the suggestion.
the answer is that i was calling paint on every timers cycle and not only when there actually were changes.

consider this, closed