OPEnSLab-OSU / ednaServer

GNU Affero General Public License v3.0
4 stars 0 forks source link

Refactor now task into task code #57

Closed NathanJesudason closed 1 year ago

NathanJesudason commented 1 year ago

Now task is incredibly similar to the task code, and what could be done is just add a bool to a regular task object to check if it is the now task, and then run that task running a sample now interrupt. Virtually nothing would be different on the UI side, but on the server side the API would need to be modified to keep the now task and the scheduled tasks separate, unless the now task ends up in the same UI location (which would make things messy).

NathanJesudason commented 1 year ago

So far sample now refactor has saved ~200 bytes of RAM and ~5500 bytes of flash, Reducing RAM usage from 27.3% to 26.7% and flash usage from 57.9% to 55.8%. This will fix the initial issue we had with the flash being too large by about 3K bytes, but I suspect more refactoring will need to be done if component testing gets fully fleshed out

NathanJesudason commented 1 year ago

What needs to be determined is how this refactoring will be implemented for other versions of the code. Should the commit be cherry-picked into other versions of the code that use sample now, or do we treat those as legacy?

NathanJesudason commented 1 year ago

Only added into V4.3