A non-empty spreadsheet cell builds three elements before any html limit applies
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- cpp
- Área
- performance
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 41
- Forks
- 10
- Merge medio
- 12 h 4 min
- PR fusionados (30 d)
- 297
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de opendocument-app/OpenDocument.core
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
opendocument-app/OpenDocument.core#1211 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 42/100
opendocument-app/OpenDocument.core#1210 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
opendocument-app/OpenDocument.core#1209 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
opendocument-app/OpenDocument.core#1208 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
opendocument-app/OpenDocument.core#1207 ·
Los mantenedores suelen responder en 1 día
Todos los issues de opendocument-app/OpenDocument.core
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
foxglove/mcap#1907 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
telegramdesktop/tdesktop#31505 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
ll-builder shell completions omit existing lockfile commands and --lockedPosiblemente ocupada @project-nju-learner la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
OpenAtom-Linyaps/linyaps#2291 ·
Los mantenedores suelen responder en 1 día