Skip to content

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants