Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

IOT trap -- core dumped


devel / comp.lang.python / Re: System, configuration and Python performance

SubjectAuthor
* Re: System, configuration and Python performanceShaozhong SHI
`- Re: System, configuration and Python performanceStefan Ram

1
Re: System, configuration and Python performance

<mailman.166.1635812425.23718.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15892&group=comp.lang.python#15892

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: shishaoz...@gmail.com (Shaozhong SHI)
Newsgroups: comp.lang.python
Subject: Re: System, configuration and Python performance
Date: Tue, 2 Nov 2021 00:20:12 +0000
Lines: 47
Message-ID: <mailman.166.1635812425.23718.python-list@python.org>
References: <CA+i5JwZKkTvdDHxDPVP0LYbv_4xHFmMKktVxX0qmgWVhbYHgUg@mail.gmail.com>
<367adc73-c522-7802-58c0-87f3e0fea691@mrabarnett.plus.com>
<CA+i5JwZvd0GKNtmfXUBTZDHCrBcRYze7v2HtjA-ik_1=iNEu5A@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de +rP0AZVh69OS/7WUSfjMjgBhY/3KI/B97L+ZumaxnnUw==
Return-Path: <shishaozhong@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=j1Pbl3PW;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.007
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; "python's": 0.05; 'usage':
0.05; 'cpu': 0.07; 'internet,': 0.07; 'cc:addr:python-list': 0.09;
'processor': 0.09; 'responses': 0.09; 'urls.': 0.09;
'subject:Python': 0.12; '&gt;': 0.14; 'cc:no real name:2**0':
0.14; 'url:mailman': 0.15; 'memory': 0.15; 'core(tm)': 0.16;
'intel(r)': 0.16; 'x64-based': 0.16; 'wrote:': 0.16; 'python':
0.16; 'probably': 0.17; 'tue,': 0.19; 'cc:addr:python.org': 0.20;
'installed': 0.23; 'url-ip:188.166.95.178/32': 0.25; 'url-
ip:188.166.95/24': 0.25; 'url:listinfo': 0.25; 'cc:2**0': 0.25;
'url-ip:188.166/16': 0.25; 'configure': 0.26; 'task': 0.26;
"isn't": 0.27; 'url-ip:188/8': 0.31; 'end.': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'there': 0.33; 'script': 0.33;
'windows': 0.34; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'from:addr:gmail.com': 0.35;
'system,': 0.36; "it's": 0.37; 'received:209.85': 0.37;
'received:209': 0.39; 'received:209.85.208': 0.39; 'both': 0.40;
'something': 0.40; "there's": 0.61; 'activities': 0.65; 'improve':
0.66; 'manager': 0.68; 'following:': 0.69; 'type:': 0.69; '2021':
0.71; 'performance': 0.71; 'waiting': 0.73; 'low': 0.74; 'shi':
0.84; 'subject:System': 0.84; 'doing.': 0.91; 'usage.': 0.91
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=6cMKtNUqijgD341hoq+HeT6NyB2BmS5eGxstX/mgPTE=;
b=j1Pbl3PWfxlTdUmz3zCUD7jZCf9TewmKXEdsKSroD+N82soCReKF0lSGn2exn9xB07
H9DMLAhGDNbf1q+EHGk7nPjPn9KbtdZvDq1PHbP30H6G/GphTGfkdIfuUtvhWY3XCT41
KtW9PQ5tqeYnVdBoRM5VDj/hI4Hfkz/Yb6AIAYkQyXL+48wn43O/DeQPofU1Mqi+xilD
LEZ9tFla4tu0z8sLxHZcVEIkfhOXOHGZB4jI52AbeE0vzngtUvkhUbWd/8acd/7qtqZp
d991NV8nPnr86ucZ5e4w1F819esv+SehYlw4jBzm4zSueNIL5naB8Z93rH4/lOC2As/e
RIJg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=6cMKtNUqijgD341hoq+HeT6NyB2BmS5eGxstX/mgPTE=;
b=rUhZKUGwPtigVgEYvOjpK0kaCRzhEsfnzSMpM1dGClZgKwvT47SGt18vduHy8z3K+q
lWzu8h/v6rHICDZTiCApyFfiJimdUPHSxVrBvo7d/vJ9BnJGMKVmlfHZs5Jctk4CeVEh
QK/36u0OaPnULqNh5wxvBlExilGBMReagtysaD0MwLy6hN6eO92gEBBSHCBuHFG+bzTY
EOCYpvm5sbOhchrnVwXqRM6e32if8MEfNu/OcApR7yhnKVZyfiYRpy+G1uO6Bb1pukhd
aazFb0aSnCrtr3mr5GNYav4he6MWC4Ac/YBMY1TkEvnJibzVf8DOv79X3fNIkrd/2M9g
itbg==
X-Gm-Message-State: AOAM530PqYaHtmP0QTRGxIXzHxKmmAJ6/1bVHQzW2dvdCXyBgOVsv3ZX
mOeJgxAzinqfno+WHZkXvUZ2+jMrk5UbEDaLgig2cQiw
X-Google-Smtp-Source: ABdhPJx3C9hKe2INlewb9hQFWzDu1Emm0xeHVcx1zNJHkPQca8nPd5DJLAJA96ugOqjKnQSFTyFpAkN1BWZXzA11vLU=
X-Received: by 2002:a50:d841:: with SMTP id v1mr45595057edj.221.1635812423505;
Mon, 01 Nov 2021 17:20:23 -0700 (PDT)
In-Reply-To: <367adc73-c522-7802-58c0-87f3e0fea691@mrabarnett.plus.com>
X-Content-Filtered-By: Mailman/MimeDel 2.1.35
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.35
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CA+i5JwZvd0GKNtmfXUBTZDHCrBcRYze7v2HtjA-ik_1=iNEu5A@mail.gmail.com>
X-Mailman-Original-References: <CA+i5JwZKkTvdDHxDPVP0LYbv_4xHFmMKktVxX0qmgWVhbYHgUg@mail.gmail.com>
<367adc73-c522-7802-58c0-87f3e0fea691@mrabarnett.plus.com>
 by: Shaozhong SHI - Tue, 2 Nov 2021 00:20 UTC

On Tue, 2 Nov 2021 at 00:09, MRAB <python@mrabarnett.plus.com> wrote:

> On 2021-11-01 23:02, Shaozhong SHI wrote:
> > How to configure to improve Python performance in a system like the
> > following:
> >
> > Windows 10
> >
> > System
> >
> > Processor Intel(R) Core(TM) i7-9700 CPU @3.60GHz, 3.60 GHz
> > Installed memory (RAM) 32.0 GB (31.8 GB usable)
> > System type: 64-bit Operating System, x64-based processor
> >
> > I found that the Python script was runnig slowly and wanted to find out
> > what is going on and what activities it is doing.
> >
> > I opened the Task Manager and found that there is not much CPU usage.
> >
> > Do I need to do something like configuration to improve Python's
> > performance?
> >
> If CPU usage is low, then that isn't the cause of the slowness.
>
> What about disk usage?
>
> What about network usage?
>
> If it's communicating across the internet, then it might be waiting for
> the other end. If that's the case, then there's probably not much you
> can do about it.
>

Both disk usage and network usage are very low as well.

It is checking out responses of internet pages with given URLs.

Regards,

David

> --
> https://mail.python.org/mailman/listinfo/python-list
>

Re: System, configuration and Python performance

<URLs-20211102013252@ram.dialup.fu-berlin.de>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15895&group=comp.lang.python#15895

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: ram...@zedat.fu-berlin.de (Stefan Ram)
Newsgroups: comp.lang.python
Subject: Re: System, configuration and Python performance
Date: 2 Nov 2021 00:33:56 GMT
Organization: Stefan Ram
Lines: 19
Expires: 1 Dec 2021 11:59:58 GMT
Message-ID: <URLs-20211102013252@ram.dialup.fu-berlin.de>
References: <CA+i5JwZKkTvdDHxDPVP0LYbv_4xHFmMKktVxX0qmgWVhbYHgUg@mail.gmail.com> <367adc73-c522-7802-58c0-87f3e0fea691@mrabarnett.plus.com> <CA+i5JwZvd0GKNtmfXUBTZDHCrBcRYze7v2HtjA-ik_1=iNEu5A@mail.gmail.com> <mailman.166.1635812425.23718.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de XCVIUlQ3Qy0y2RbDEfZjgQ32VJrw9UOoltDExuHmthDoAp
X-Copyright: (C) Copyright 2021 Stefan Ram. All rights reserved.
Distribution through any means other than regular usenet
channels is forbidden. It is forbidden to publish this
article in the Web, to change URIs of this article into links,
and to transfer the body without this notice, but quotations
of parts in other Usenet posts are allowed.
X-No-Archive: Yes
Archive: no
X-No-Archive-Readme: "X-No-Archive" is set, because this prevents some
services to mirror the article in the web. But the article may
be kept on a Usenet archive server with only NNTP access.
X-No-Html: yes
Content-Language: en-US
Accept-Language: de-DE, en-US, it, fr-FR
 by: Stefan Ram - Tue, 2 Nov 2021 00:33 UTC

Shaozhong SHI <shishaozhong@gmail.com> writes:
>It is checking out responses of internet pages with given URLs.

That's cool! Just start each request as a new thread:

import threading

# ...

while True:
receive_thread = threading.Thread( target=thread )
receive_thread.start()
time.sleep( t )

. Adjust the time "t" above and also the timeout parameter
of your request to your needs. "thread", then, is a function,
where you get the next URI from the todo list and check it.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor