4 ms·
We stopped caring because it didn't matter. Except when it began to matter it was too late. Somethings you have to plan for from the start. You can't go back la
by forrestthewoods 11y ago
We stopped caring because it didn't matter. Except when it began to matter it was too late. Somethings you have to plan for from the start. You can't go back later and fix it after the fact.
- kuschku 11y agoEven switching from "copy and allocate objects everywhere" to non-copying native IO can improve your memory efficiency and usability. I am working on an Android app, and rewrote the part that handles the connection via a binary protocol over a socket with a remote server. Rewriting that to take advantage of NIO already improved connection times (build up a connection, initialize, etc) from almost 2 minutes to only 8 or 9 seconds. RAM usage of the backend was reduced by 50% – and it is easier readable. More often than not it’s not that hard to add it, if one carefully thinks about the requirements and future extensions at every step.
- forrestthewoods 11y ago> More often than not it’s not that hard to add it, if one carefully thinks about the requirements and future extensions at every step. Is that argument to think about memory from the start or to not think about it until absolutely necessary? :)
- kuschku 11y agoIf you don’t want to think about memory from the start, at least think about making your code in a way that you can exchange it later on with memory-conscious code.