[Gambas-user] Program producing constant load
Rolf-Werner Eilert
rwe-sse at osnanet.de
Wed Mar 30 16:49:44 CEST 2022
Am 30.03.22 um 14:05 schrieb Bruce Steers:
>
>
> On Wed, 30 Mar 2022 at 11:06, Rolf-Werner Eilert <rwe-sse at osnanet.de
> <mailto:rwe-sse at osnanet.de>> wrote:
>
> Am 30.03.22 um 11:32 schrieb Benoît Minisini:
> > Le 30/03/2022 à 10:54, Rolf-Werner Eilert a écrit :
> >> For my office use, I made a remake of my calendar program.
> >>
> >> Everything running fine so far, but today I saw that when I have
> the
> >> program on the active screen, it produces a constant load of
> about 40
> >> % (the little faker on my desktop has 4 CPUs and Xosview says
> 1.3 with
> >> the calendar visible).
> >>
> >> top says gbr3 is sucking CPU, but of course no more information.
> >>
> >> So my question is, how can I find out what is going on within my
> >> program? Obviously, there is one event which is fired over and over
> >> again.
> >>
> >> Regards
> >> Rolf
> >>
> >
> > gbx3 -t displays each ligne executed. It generates a lot of log
> in the
> > terminal, but you can see what the program runs exactly.
> >
> > Regards,
> >
>
> Oh yes, that shows it clearly: There is a large gridview displaying the
> hours for each day. Obviously, the gridview constantly fires up the
> Data
> event which jumps into one function looking for the school holidays.
>
> The question is, why is Data called over and over again?
>
> This is an Ubuntu Mate and I chose gb.qt5 and gb.qt5.ext as libraries.
> May that be the reason? Or should I look for something else? I have
> other projects running with the same libraries here, they use Gridview
> as well, and they do not constantly fire the Data event.
>
>
> Lets see the code.
> I suspect there is some code causing the data event to trigger again
> within the data event.
>
> Like putting any instructions in a _Draw event that cause an object
> refresh will cause a recursive loop
> BruceS
Good idea! Here is a tar.gz of the project, but without the calendar
data. Sorry, but it would be too complicated to deliver these data too.
So you can look at the code, but I guess you won't be able to get it
running.
Regards
Rolf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Kalender4-0.0.10.tar.gz
Type: application/gzip
Size: 144705 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220330/24d2c27f/attachment-0001.gz>
More information about the User
mailing list