-
Notifications
You must be signed in to change notification settings - Fork 2k
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
size of the lib #1154
Comments
FWIW - just noticed this on gitter: https://www.screencast.com/t/nlFyjjfUX
…On Mon, Nov 30, 2020 at 3:14 PM sebosfato ***@***.***> wrote:
Hello i was using old version of the lib and it was only for esp8266 i
guess and it consumed 40kb less memory from my esp01 very small memory
available.. upon moving to new updated lib with non blocking function it
dont fit within the memory with enough space left for httpupdate...
my question is there a way to edit the lib for use separete for esp8266
from esp32 or perhaps reduce the size of the wifi signal streght image to
fit ?
anybody help please?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1154>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC7Y5YJH5CYRM24OR5QJMFLSSQRN3ANCNFSM4UIHG4DA>
.
|
you mean could be possible to update from a compressed file? i tried to delete all the esp32 ifdef elif etc from the cpp file but didnt reduced much, it seems to me that the main alternatives would be to reduce the size of the png file or maybe delete the debug options... those seems to be related to this great increase in size of the lib... when i tried to delete the debug lines it broke the code.. |
Nice I have been meaning to look into gzip, at least for the css. I can see what I can remove, I am going to make the info details optional or reduce them back down, and fix up debug environment (for prod) to not always compile, some of the css can be reduced and you can remove the icons I would not even consider running this on an 01 |
Would be lovely to use it with the 01... the older version even run but if i get over 406kb of sketch space the http update wont run... im using it at the limit of space... counting variables to try reduce it... i think that wifi signal strenght icon could be reduced with no loss in apearance maybe thanks in advance for developing all this! |
Nah I already optimized the sprite png, svg was larger. But I am open to optimizations, or ascii? I also added some public helpers, which many might not need, I can wrap those in a light define to remove them |
Should try that gzip method for the best across-the-board results... It
looks like the simplest solution based on that forum post. And it will get
lost soon as gitter is an active board.
…On Tue, Dec 1, 2020 at 3:57 AM Shawn A ***@***.***> wrote:
Nah I already optimized the sprite png, svg was larger. But I am open to
optimizations, or ascii?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1154 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC7Y5YJA65HU6NGXB7TSVVLSSTKZHANCNFSM4UIHG4DA>
.
|
The main issue is that alot of the code is templated and dynamic, not much is actually static |
in the mean while i found some few special kilobytes reduction by setting the iwipvariants to high bandwidth no features.. do you know guys what features are this? could not find documentation about my sketch varies from 412k with to 402k with no features... I think most of the increase of the lib size may be the debug function that is being compiled together... if we could simply deactivate the debug stuff from being compiled would turn out very much smaller... the original wifimanager cpp i was using had 22kb the new had 90kb just my guess |
That is a good question, I am not sure about the new lwip variants, quick search found not much info |
I moved all debug strings to flash, there were some that were not still BEFORE AFTER RAM: [=== ] 34.7% (used 28464 bytes from 81920 bytes) WM_NODEBUG |
Master RAM: [==== ] 35.5% (used 29052 bytes from 81920 bytes) Where are you getting your numbers from , cpp filesize is irrelevant, its not compiled and includes esp32 |
when i compile with the new alpha version it come out with 438kb and with the old one 410.. something is going wrong with the updates... thats why i was trying to reduce things without loosing functionality my 01 is 1mb so it should be able to get updates up to 470kb doesnt it? what could be going wrong? spiffs aparently update well but not the sketch it fails and reboot using nodemcu for same file works well.. i was trying with the 01 cause is much cheaper |
What all are you loading ? Additional libraries? |
Im using lots of libraries, let me show you #include <FS.h> each is needed by a function called in the messy code... and the code is more than 1000 lines long... |
28K more ? |
from the wifimanager lib im using wm gives a lot of debuging info on the serial monitor... maybe thats whats calling so much memory on the new version i found that taking printf comands out takes some bits out... |
I already removed the debug as I stated above, it should save you like 11k |
2k more if I remove vector |
with the new version you changed i tried and it reduced from 430 to 427 kb size of the ino.bin file its great already because it dont show those parameters at startup... |
Is that with or without debugging ? WM_NODEBUG |
I am about to merge in OTA, I hope it doesn't make it that much bigger... lol |
i tried this wm.setDebugOutput(false); how do you set this wm_nodebug? |
Are you using arduino? You might have to edit the .h file and add it. In pio you can add it to build flags. For now debug is enabled for dev reasons |
im using the last arduino ide esp 01 im trying to add to see what happens i tried #define WM_NODEBUG nothing changed |
Nah if you do it in your sketch it wont work, Ill cut a new branch with no debug for you to try |
great..thanks a million where can we find? |
Just pushed it, branch dev_nodebug |
Hey i just tested it worked now it takes 13kb less memory thanks a milion times saved the day.... i have a question dont know if is related but my http updates are working well but i get no response for the sketck ok updated i tried all here and there but it seems that is interfering with something on memory because with nodemcu that has 4mspiff it works.. when the sketch finish uploading the serial monitor prints some blank spaces... do you know what could it be?: i googled it but didnt found solution problem is that i would like to update eprom before reset and is reseting before the switch ret so i have no chance to save.. |
I get caught by this now and then, it might be the same issue,sometimes you have to restart the esp after ota as it does not do a real restart, only a soft. |
ALso try clean erasing flash if you have been switching esp lib versions |
i tried everything you can imagine even changing the order of libs and how the things are called in setup i suspect it may have to to with the conversion toFloat() or something because the led build in is one of the serial gpio1 or is because task manager variables versao, versaofs are float and versaoatual is a string that is result of the first request thats why i have to transform to float to compare.. doing exact the same on node mcu void UPDATE(){ http.begin(client, versaoatualphp); Serial.println(httpCode); //Print HTTP return code if (versao==versaofs){ else if (versao != versaoatual.toFloat()) { Serial.println("versao da atualização "); // Serial.end();
if (ret == HTTP_UPDATE_OK) {
}} ` here in this part works nice it prints the output void UPDATEFS (){ HTTPClient http;
here is the serial output for the part that fails 07:38:22.676 -> 200 |
what exactly you mean here? by the way great job on the lib!!! thanks again its opening the doors for most people working with those chips |
Full flash erase from esptool or arduino, sometimes the flash gets corrupted |
was working flawless on node mcu now is not working...not sure what is going... same code same problem... i tried switching back to the standard wifimanager to see if this was the diference ... not a clue... =( |
i just managed it to work by seting this flag ESPhttpUpdate.rebootOnUpdate(false); ESPhttpUpdate.rebootOnUpdate(false); but i would like to understand why it stoped working ... not sure if they changed the lib... i think i updated my arduino ide few days ago... |
i found it because i found how to turn on the debug from httpupdate on the preferences and it was returning the ok but not printing because maybe some function changed so i found this boolean function ESPhttpUpdate.rebootOnUpdate(false); inside the .h file of this lib ESPhttpUpdate.rebootOnUpdate(false);
} |
Yeah I am not entirely sure how ESPhttpUpdate relates to this issue , but you should check that out with the esp guys, ask on gitter |
i tried to ask them there lets see what comes out... thanks a lot bro! |
What board are you using ? |
Hello i was using old version of the lib and it was only for esp8266 i guess and it consumed 40kb less memory from my esp01 very small memory available.. upon moving to new updated lib with non blocking function it dont fit within the memory with enough space left for httpupdate...
my question is there a way to edit the lib for use separete for esp8266 from esp32 or perhaps reduce the size of the wifi signal streght image to fit ?
anybody help please?
The text was updated successfully, but these errors were encountered: