| Message ID | 20250125122752.649-1-egyszeregy@freemail.hu |
|---|---|
| Headers | show |
| Series | bitbake: knotty/progressbar: Optimize footer update and prints. | expand |
On 25 Jan 2025, at 12:27, Livius via lists.openembedded.org <egyszeregy=freemail.hu@lists.openembedded.org> wrote: > > From: Benjamin Szőke <egyszeregy@freemail.hu> > > - Add self._fd_console to use for self._handle_resize() in ProgressBar() class > - Optimize printing in footer update with use a StringIO buffer. > - Use 40 Hz refresh rate (FPS) for footer update. > - Cleaning and refactoring prints in code, print() functions were eliminated from all loops for better performance. These seem like sensible optimisations, but how are you testing them and what sort of improvements do you see? I just did a moderately large build, wiped tmp, and rebuilt it: this results in 11K tasks that are entirely from sstate and with master this takes my builder 2:08s. If I apply your patches, which I would expect to help the near-pathological case of 11K short-lived tasks, it takes 2:07s. Ross
s=20181004; d=freemail.hu; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=861; bh=FXx49zmiscgfRbzJwarszJcsI4rYL6MWxDNToLOqrT0=; b=tapD2yOndckYH0Eo2+VzP2tr72i/Ze8TK7DzaplCZ8+3u2Zyu1ucalXX04W9EmsI Wyb2Gp9xMDJil8WQqQQLrRv2yHMM+ZbnxIXhBD/CfUsqGK2vIqUDRTr4sNkWnAtb22E eiR48k0SMTKtxo66DUywwj5JN9Qu9ufFvSW9N4vptlZZwGgm97LiZfohsPpYxxYkvLe BYiHgJUxLHl4ID3972Yv6Tc3Mim4AfBnwhR2PGNp5XxpLLKUoOa0VJ2Gvh5ambrr+4r xF5wNg9F5A97j0N7qV3UMawU07hqLqSRxniWP3PNEsyZTLXgHr8yYmU5wn/b5Oy4N4v y969TQilYw== Content-Transfer-Encoding: quoted-printable From: Benjamin Sz=C5=91ke <egyszeregy@freemail.hu> - Add self._fd_console to use for self._handle_resize() in ProgressBar() = class - Optimize printing in footer update with use a StringIO buffer. - Use 40 Hz refresh rate (FPS) for footer update. - Cleaning and refactoring prints in code, print() functions were elimina= ted from all loops for better performance. Benjamin Sz=C5=91ke (4): bitbake: progressbar: Add self._fd_console to use for self._handle_resize() bitbake: knotty: Use a StringIO buffer for update footer. bitbake: knotty: Use 40 Hz refresh rate (FPS) for footer update. bitbake: knotty: print() was eliminated from all loops for better performance. lib/bb/ui/knotty.py | 74 ++++++++++++++++++++++++---------- lib/progressbar/progressbar.py | 11 ++++- 2 files changed, 62 insertions(+), 23 deletions(-) --=20 2.47.1.windows.2