public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: Takashi Yano <takashi.yano@nifty.ne.jp>,
	The Cygwin Mailing List <cygwin@cygwin.com>
Subject: Re: xwin-xdg-menu high cpu usage with rxvt-unicode
Date: Wed, 23 Jun 2021 17:41:25 +0100	[thread overview]
Message-ID: <608c8616-52a3-bbfb-f8f0-983a6c4453b1@dronecode.org.uk> (raw)
In-Reply-To: <20210623120858.83e471aa7ddbc20cd41efb2c@nifty.ne.jp>

On 23/06/2021 04:08, Takashi Yano wrote:
> On Mon, 21 Jun 2021 05:49:28 +0000
> Viet-Duc Le wrote:
>> Hi,
>>
>> I've encountered a peculiar issue with rxvt-unicode launched from xwin-xdg-menu (20170321-1)
>> The image below corresponds to two rxvt-unicode instances, each occupies 30% of system resouce.
>> https://imgur.com/a/FTFwIrZ
>> I'm using the the latest version of cygwin. 'cygcheck.out' is attached per guideline.
>>
>> Steps to reproduce:
>> - Start XWin Server from Start menu
>> - X applications menu -> System Tools -> rxvt-unicode
>> - Kill rxvt-unicode to free the resource again
>>
>> Other observations:
>> - XTerm does not incur high resources.
>> - Manually launching rxvt-unicode from XTerm does not incur high resources.
>>
>> I think this is not an issue with rxvt but with xwin-xdg-menu.
>> On laptop, it is very noticeable when the fan kicks in.
>> Insights and suggestions are much appreciated.
>>
>> Thanks.
>> Viet-Duc
> 
> I looked into this problem and found the cause.
> urxvt seems to close stdout while xwin-xdg-menu use select()
> to read stdout of the launched apps. Since stdout is closed,
> select() returns repeatedly without any output. This causes
> high cpu load.
> 
> I also confirmed that the following patch for xwin-xdg-menu
> resolves the issue.
> 
[...]
> 
> Jon, could you please have a look?

Thanks very much for looking into this, and the patch.

That looks right.

I applied the patch, and built and uploaded a xwin-xdg-menu-20210623-1 
test package.

Perhaps you could try that, and see if it improves things for you?

(Similar code is used in XWin, so I also need to make a similar change 
there)

  reply	other threads:[~2021-06-23 16:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21  5:49 Viet-Duc Le
2021-06-23  3:08 ` Takashi Yano
2021-06-23 16:41   ` Jon Turney [this message]
2021-06-25  0:08     ` Viet-Duc Le

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=608c8616-52a3-bbfb-f8f0-983a6c4453b1@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin@cygwin.com \
    --cc=takashi.yano@nifty.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).