Hi,
Recently I observed some performance issues relating to Gio v0.6.0.
Someone reported this in my project
tool(https://github.com/oligo/gioview/issues/1).
I confirmed that after upgrading from v0.5.0 to v0.6.0, CPU, GPU usage
and also memory
usage increased a lot.
In my test app(https://github.com/oligo/gioview/tree/main/example):
CPU: 4% max to 28%
GPU: 0.3% to around 17%.
Memory: 300MB to around 800MB.
Would you please confirm if this is related to the last internal refactoring?
Best Regards
Zhijian Zhang
On Mon, May 6, 2024 at 12:57 PM zhang zj <zhangzj33@gmail.com> wrote:
>> Hi,>> Recently I observed some performance issues relating to Gio v0.6.0.> Someone reported this in my project> tool(https://github.com/oligo/gioview/issues/1).> I confirmed that after upgrading from v0.5.0 to v0.6.0, CPU, GPU usage> and also memory> usage increased a lot.>> In my test app(https://github.com/oligo/gioview/tree/main/example):>> CPU: 4% max to 28%> GPU: 0.3% to around 17%.> Memory: 300MB to around 800MB.>> Would you please confirm if this is related to the last internal refactoring?
Could you share your before/after CPU and heap profiles? This mailing
list doesn't allow attachments, but you could just link to them
attached anywhere else.
Cheers,
Chris
I have to point out that memory usage might be misleading as I loaded
that huge Apple emoji font.
On Tue, May 7, 2024 at 2:20 AM zhang zj <zhangzj33@gmail.com> wrote:
>> Hi Chris,>> Profiling data is uploaded here:> https://github.com/oligo/gioview/issues/1#issuecomment-2096620094>> Thanks,>> Zhijian Zhang
--
------------------------------------------------------------------
from zj.zh
On Mon, May 6, 2024 at 2:27 PM zhang zj <zhangzj33@gmail.com> wrote:
>> I have to point out that memory usage might be misleading as I loaded> that huge Apple emoji font.>> On Tue, May 7, 2024 at 2:20 AM zhang zj <zhangzj33@gmail.com> wrote:> >> > Hi Chris,> >> > Profiling data is uploaded here:> > https://github.com/oligo/gioview/issues/1#issuecomment-2096620094
From what I can see, we are spending enormously more time in the Go
runtime and in the native macOS integration code than we previously
were. However, you mention that you have started loading a massive
emoji font. Are there any other application logic changes? Things will
get muddy quickly here if there are unrelated changes.
The best path forward would be trying to replicate this resource use
disparity on an official Gio example, ideally the simplest one you
can. That will help eliminate variables.
Cheers,
Chris
Hi Chris,
I fixed this issue. It turns out to be the problem of setting window
title in the View Manager.
View manager sets the window title using the title of the current
view, but current view is
queried for every frame, thus resulting in high CPU usage.
Setting window options in Gio v0.6.0 seems to be a costly operation
compared to v0.5.0.
Thanks for your help and sorry for being so impulsive.
Best Regards,
Zhijian Zhang
On Tue, May 7, 2024 at 4:23 AM Chris Waldon
<christopher.waldon.dev@gmail.com> wrote:
>> On Mon, May 6, 2024 at 2:27 PM zhang zj <zhangzj33@gmail.com> wrote:> >> > I have to point out that memory usage might be misleading as I loaded> > that huge Apple emoji font.> >> > On Tue, May 7, 2024 at 2:20 AM zhang zj <zhangzj33@gmail.com> wrote:> > >> > > Hi Chris,> > >> > > Profiling data is uploaded here:> > > https://github.com/oligo/gioview/issues/1#issuecomment-2096620094>> From what I can see, we are spending enormously more time in the Go> runtime and in the native macOS integration code than we previously> were. However, you mention that you have started loading a massive> emoji font. Are there any other application logic changes? Things will> get muddy quickly here if there are unrelated changes.>> The best path forward would be trying to replicate this resource use> disparity on an official Gio example, ideally the simplest one you> can. That will help eliminate variables.>> Cheers,> Chris