Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML output collapsing fails when more than one section is specified #19

Open
jedrzejboczar opened this issue Jan 9, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jedrzejboczar
Copy link
Owner

It seems that when generating HTML output for more than one section (e.g. elf-size-analyze -WFR) it is not possible to collapse a row. The javascript currently assumes there is only one generated document.

@jedrzejboczar jedrzejboczar self-assigned this Jan 9, 2023
@jedrzejboczar jedrzejboczar added the bug Something isn't working label Jan 9, 2023
@dkuschmierz
Copy link
Collaborator

I think we should think about writing it to files directly. Another thing I noticed while working with a big ELF file is, that most of the time is spent to analyze the file. Writing to the output is really fast. In one of my project I need to store the results for ROM and RAM in HTML and JSON format and this takes a lot of time as I have to run the tool multiple times and therefore parse the file multiple times. I think we would benefit from parsing the file once and then generate all needed output formats in separate files...

@jedrzejboczar
Copy link
Owner Author

It makes sense. Another option would be to allow loading data from JSON (the one that we generate) and just displaying it. But then we would need to add some metadata to JSON, so it's probably better to stick with always parsing the ELF file.

If we add option to generate JSON/HTML in separate files then I would prefer to specify file names explicitly instead of auto-generating file names (so e.g. elf-size-analyze fw.elf -R -W out.html -j out.json). Then we would have to always put all sections output in one HTML/JSON (same as now everything goes to stdout). We could instead provide simple templating and put section name/number in a placeholder, e.g. elf-size-analyze fw.elf -FR -W 'out_{}.html' -j 'out_{}.json'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants