
Description
While working on issue #(4166) I noticed the compiled size of the test program I was using grew by about 34 kB and RAM usage grew about 1.4 kB in version 2.4.0 compared with 2.3.0. While this is not a critical issue, the sudden jump is a concern. Note there was only a very small increase from 2.2.0 to 2.3.0. I wonder if there is a particular reason for this latest increase and whether some way might be found to reduce it.
My application ( here ) already uses about 850 kB and I am hoping to add more features so the loss of 34 kB may eventually become significant.
Here are the sizes reported after setting the ESP Huzzah Board version, using the toy sketch below:
Version Program RAM
2.2.0 223660 31543
2.3.0 226353 31904
2.4.0 260583 33384
`
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <SPI.h>
#include <ESP8266WiFi.h>
#include <WiFiServer.h>
#include <WiFiClient.h>
#include <WiFiUdp.h>
char ssid[] = "clearskyinstitute";
char pw[] = "from651plan";
void setup()
{
Serial.begin(115200);
WiFi.enableSTA(true);
WiFi.setAutoConnect (true);
WiFi.setAutoReconnect (true);
WiFi.begin (ssid, pw);
Serial.println("start");
}
void loop()
{
prWiFiStatus(WiFi.status());
if (WiFi.isConnected())
Serial.println (WiFi.localIP());
delay(2000);
}
void prWiFiStatus (int s)
{
#define VALCASE(x) case x: Serial.println(#x); break;
switch (s) {
VALCASE(WL_NO_SHIELD);
VALCASE(WL_IDLE_STATUS);
VALCASE(WL_NO_SSID_AVAIL);
VALCASE(WL_SCAN_COMPLETED);
VALCASE(WL_CONNECTED);
VALCASE(WL_CONNECT_FAILED);
VALCASE(WL_CONNECTION_LOST);
VALCASE(WL_DISCONNECTED);
default: Serial.println(s); break;
}
}
`