-
Notifications
You must be signed in to change notification settings - Fork 2.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
[memory usage] Device combobox takes enormous amount of memory #654
Comments
perhaps, or even get the list with a seperate ajax call? |
I was thinking about generating part of the combo box only once and store it in flash. |
yeah ah you mean, generate it runtime and store it in spiffs? |
Yes something like that.
Still some issues like detect changes, but that's the Idea.
…On Jan 2, 2018 11:35, "DatuX" ***@***.***> wrote:
yeah ah you mean, generate it runtime and store it in spiffs?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#654 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADk9lo_4d3UMQu0ZjBhtvR2gHT0ejcXDks5tGgZYgaJpZM4RLiU5>
.
|
yep, but does that help? we still would have to load that file and that still takes 4kb of memory? 4k wouldn't be a problem if we create a extra GET handler for it that only generates and returns this list. |
There is also the retrieving of the plugins, sorting them, converting to HTML (and adding the selected part), etc. |
perhaps..still its pretty complex and i wonder how much it eventually saves. |
I will try and test myself. |
ah the function would not cache it to flash? then i see no issue. |
No, flash is for reading, not for writing (often) :) |
ok, i'm setting up a build "bot" to trigger nightly builds for the mega-branch. should make testing easier for users. (will make a forum post about this as well) |
Could you please change the date order in the mega builds to yyyymmdd ?
Having a mega branch Autobuild is very helpful.
…On Jan 3, 2018 00:59, "DatuX" ***@***.***> wrote:
ok, i'm setting up a build "bot" to trigger nightly builds for the
mega-branch. should make testing easier for users. (will make a forum post
about this as well)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#654 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADk9llxAcVNUD0H9WwDHIlQEbw6QdEgwks5tGsLfgaJpZM4RLiU5>
.
|
Ok i will. |
i just though of a better solution: Just create a separate and simple "Add device" page for empty tasks. T After that we wont need to show the combobox on the Edit page. We only need to add a delete button to delete a device. |
Sounds like a plan :) |
this was pretty easy to fix and we had a lot of memory issues, so moved to v2.0. |
fixes letscontrolit#654 letscontrolit#676 and could be triggered by letscontrolit#683 in some cases.
* [switch] Fixed switch behavior and default settings. (#675) As described in #673 . The problem was partly related to the default values stored in flash ("0"), which was not a valid value for the switch type. When upgrading from an older version of ESPeasy, make sure to check the switch type (normal switch or dimmer) and save the settings for the switch device again, even when nothing was changed. Default configuration and new added switches will now work like intended. When a controller is enabled (e.g. Domoticz MQTT or -HTTP) and the button is pressed multiple times, the ESP may reboot. See issue #674. * ABC calibration feature added (#606) * [Flash info] Detailed flash information (#678) Last few days a number of issues and forum topic was about the type of flash used on the ESP boards. This is an extension of the detailed information page. Perhaps also merge with the newer and more clear layout of pull request #624? That pull request was only merged to the mega branch. I kept the changes local, but perhaps they should be placed in the "Storage" section introduced with #624. Maybe also that pull request should get merged into the v2.0 branch. * Bugfix/v2.0 crash switch (#682) * [crashes] Added constructors to initialize all members in structs Numerous structs are defined, but none of them have default constructors and there is no guarantee the members will be set when used. With these default constructors, the parameters at least have an initialized value. * [PubSubClient] Add bound checks on the internal buffer Not sure if this was really causing an issue, but proper bound checks are always a good thing. * [Crash Switch] Disabled delayBackground and added yield() calls Something really fishy is going on with the delayBackground function, which will result in crashes when pressing the switch multiple times, with Domoticz MQTT enabled as first controller. Disabled for now and delay(1) added to give background tasks a chance to do their work and make sure the watchdog doesn't perform a reset. * [CI build errors] Commented out some unused variables Travis considers them as error and fails the checks. * [CI check] Out-of-bounds check fix * actually ignore MQTT messages that are too big. * moved mqtt stuff outside of backgroundtasks(). fixes #683 in my test scenario * [Adafruit MPR121] Change deprecated name setThreshholds to setThresholds (#685) See #684 * fixed plugin id of "Communication - Kamstrup Multical 401". (accidental octal notation) * changed devicecombobox handling to save a lot of memory on device page. fixes #654 #676 and could be triggered by #683 in some cases. * [CPPcheck] v2.0 ControllerSettingsStruct some variables not initialized (#692) Fixing these cppcheck errors: 101.43s$ cppcheck --enable=warning src/*.ino -q --force -I src --include=src/ESPEasy.ino --error-exitcode=1 [src/ESPEasy.ino:500]: (warning) Member variable 'ControllerSettingsStruct::HostName' is not initialized in the constructor. [src/ESPEasy.ino:500]: (warning) Member variable 'ControllerSettingsStruct::Publish' is not initialized in the constructor. [src/ESPEasy.ino:500]: (warning) Member variable 'ControllerSettingsStruct::Subscribe' is not initialized in the constructor.
The device combobox with the listed devices takes about 4kB of memory.
For some device pages with lots of information, it has become too much.
For instance the OLED framed plugin - when active- can hardly load anymore and may lead to several crashes. Especially when the scrolling on the OLED display is enabled and more than 4 lines of text are available. (N.B. mega branch) This page (OLED framed plugin) can become around 9.5 kB of HTML.
So perhaps we can generate the combobox with devices at compile time and store it in flash?
Or generate those things in real time when sending a HTTP chunk?
Or disable the plugin when settings are being altered?
The text was updated successfully, but these errors were encountered: