A non-empty spreadsheet cell builds three elements before any html limit applies
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- cpp
- Domínio
- performance
Direção de pesquisa
Start with ElementRegistry::Sheet::Cell and the pugi::xml_node it already holds, then trace how the registry tree is built and traversed as const. Compare this with sheet_rendered_extent in internal/html/document_element.cpp and the spreadsheet limit settings. Done means distinct non-empty cells no longer eagerly build paragraph/text children while preserving the required element-id and traversal behavior.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Split out of #762, which #780 otherwise finishes. Numbers are against #780.
odr-private/ods/efficiency-big-1.ods decodes into 3.16M registry elements for
1.05M cells: parse_sheet creates a sheet_cell element and then
parse_any_element_children builds a paragraph and a text for the cell's
<text:p>Genius</text:p>. Every row of that file is the same three cells and the
rows are not number-rows-repeated-compressed, so each one is distinct and
none of the collapsing added in #776 applies.
Empty cells already cost nothing — is_cell_empty registers a range entry with a
null element id and no element at all — and since #776 a repeated cell with
content is one entry too. This is the remaining case: a distinct non-empty
cell, expanded eagerly.
What it costs
Per cell, after #780:
sheet_cell, paragraph, text elements |
3 x 32 B |
m_sheet_cells entry (position + repeated flag) |
16 B |
m_texts entry (the run's last node) |
16 B |
sheet index Cell (range end, element id, node) |
16 B |
| 144 B |
which is ~150 MB of the 626 MB peak on that file. Making the children lazy is
worth the paragraph, the text and the m_texts entry — ~85 MB — and leaves
~68 MB for the cells themselves.
HtmlConfig::spreadsheet_limit and spreadsheet_cell_limit do not bound any of
it: they are applied in sheet_rendered_extent (internal/html/document_element.cpp),
long after odf::Document's constructor has built the whole tree. A 100-row,
2000-cell budget costs exactly as much as the default one.
Options
- Lazy children.
ElementRegistry::Sheet::Cellalready holds the
pugi::xml_node, so a cell's children can be built on first access. The
registry is a pre-built tree today and traversal isconst, so this needs an
on-demand builder and a decision about what an element id means before its
element exists. - Bound the parse. Let the cell budget reach decode time so the parser stops
registering content past it. Cheaper, but it makes the model depend on the
render config, which the architecture deliberately keeps apart.
The first is the one that generalises: it is the same lifetime question a
streaming decode asks (see the sibling issue), so it is worth doing first and
learning from cheaply.
- Linguagem predominante
- C++
- Estrelas
- 41
- Forks
- 10
- Merge médio
- 10h 30min
- PRs com merge (30d)
- 342
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de opendocument-app/OpenDocument.core
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
opendocument-app/OpenDocument.core#1281 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 57/100
opendocument-app/OpenDocument.core#1280 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
opendocument-app/OpenDocument.core#1279 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
opendocument-app/OpenDocument.core#1278 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
opendocument-app/OpenDocument.core#1221 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de opendocument-app/OpenDocument.core
Issues semelhantes
-
crash lld:COFF
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
llvm/llvm-project#235970 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: iOS textarea wraps text mid-word because LynxUIBaseInput hardcodes NSLineBreakByCharWrappingAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
lynx-family/lynx#10455 ·
Mantenedores costumam responder em até 1 dia
-
A-tools P-low S-blocked task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
cv::checkRange fails with "Unsupported matrix depth" for fp8 depthsTalvez já em andamento @sshivensolanki assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
Rifle-variant weapon offsets are saved under the pistol's name [FRIK-093]Talvez já em andamento @rollingrock assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
rollingrock/Fallout-4-VR-Body#182 ·