Skip to content

Flash size reduction for mime-type #7312

New issue

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

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

Already on GitHub? # to your account

Merged
merged 3 commits into from
May 19, 2020

Conversation

s-hadinger
Copy link
Contributor

Superseded #7311

The current mime-type array is based on Entry structure with fixed size string that waste a lot of Flash space (~400 bytes):

struct Entry
{
  const char endsWith[16]; 
  const char mimeType[32];
};

I replaced with standard PROGMEM strings.

I also added #define MIMETYPE_MINIMAL to reduce the footprint to mime-types that are strictly necessary: html, txt, gz

Overall this saves 1kB for Tasmota.

* moving from fixed size strings to standard PROGMEM strings
* adding `#define MIMETYPE_MINIMAL` to reduce the footprint to
  mime-types that are strictly necessary
Copy link
Collaborator

@devyte devyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was something pending, thanks.

@earlephilhower
Copy link
Collaborator

One of the VMs died during the CI process. Just restarted, once it's good I'll hit merge.

@earlephilhower earlephilhower merged commit 7c008e3 into esp8266:master May 19, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants