Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7162)

Issue 583570043: Reduce memory use of lilypond-book (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 2 months ago by hanwenn
Modified:
4 years, 1 month ago
Reviewers:
hahnjo
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Reduce memory use of lilypond-book The snippet extraction was using re.search(string[start:end]). This created many copies of the input string, such that processing a 12M would use over 6G of memory. Instead, use regex.search(string, start, end) which avoids the string slicing. Do some general cleanups while we're at it: * move find_toplevel_snippets to book_base * add unittest for find_toplevel_snippets * remove wildcard imports * add some doc strings

Patch Set 1 #

Total comments: 1

Patch Set 2 : memory #

Patch Set 3 : jonas #

Unified diffs Side-by-side diffs Delta from patch set Stats (+283 lines, -224 lines) Patch
M python/GNUmakefile View 1 chunk +3 lines, -0 lines 0 comments Download
M python/book_base.py View 1 8 chunks +106 lines, -6 lines 0 comments Download
A python/book_base_test.py View 1 2 1 chunk +51 lines, -0 lines 0 comments Download
M python/book_docbook.py View 6 chunks +18 lines, -17 lines 0 comments Download
M python/book_html.py View 4 chunks +26 lines, -30 lines 0 comments Download
M python/book_latex.py View 7 chunks +21 lines, -28 lines 0 comments Download
M python/book_snippets.py View 6 chunks +13 lines, -11 lines 0 comments Download
M python/book_texinfo.py View 1 15 chunks +34 lines, -32 lines 0 comments Download
M scripts/lilypond-book.py View 9 chunks +11 lines, -100 lines 0 comments Download

Messages

Total messages: 6
hahnjo
LGTM, thanks for the cleanup! In the future we might even consider putting all the ...
4 years, 2 months ago (2020-02-24 10:05:04 UTC) #1
hanwenn
memory
4 years, 2 months ago (2020-02-24 10:15:40 UTC) #2
hanwenn
jonas
4 years, 2 months ago (2020-02-24 10:17:59 UTC) #3
hanwenn
PTAL
4 years, 2 months ago (2020-02-24 10:18:44 UTC) #4
hahnjo
LGTM
4 years, 2 months ago (2020-02-24 10:22:49 UTC) #5
hanwenn
4 years, 1 month ago (2020-02-28 17:30:20 UTC) #6
commit fa1ec0c100859f7490f524870743f03b54f89ab7
Author: Han-Wen Nienhuys <hanwen@lilypond.org>
Date:   Mon Feb 24 09:40:08 2020 +0100

    Reduce memory use of lilypond-book
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b