Skip to content
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

Mtos cache in ram to boost performance #121

Merged
merged 4 commits into from
Apr 26, 2018
Merged

Mtos cache in ram to boost performance #121

merged 4 commits into from
Apr 26, 2018

Conversation

bell07
Copy link
Collaborator

@bell07 bell07 commented Mar 22, 2018

Before this change for each action the the nodemeta was read and the "Operating system" object restored. After the action processing the nodemeta was saved to node and objec gets lost.

Now an Lua-table is used to cache the "Operating system" instances to avoid unnecessary reads and wirtes to nodemeta. For some operations the full sync is forced (like inserting disk) but usual the "Operating system" instance is cached till 5 seconds not used.

The most noticable performance boost is in tetris app because the game requests the OS 3x per second

The drawback is in case the server crashes maybe some changes are not stored.

@Gerold55 @Grizzly-Adam @apachano please thest the changes intensive before we can merge them

@bell07
Copy link
Collaborator Author

bell07 commented Mar 22, 2018

I updated also my master with all open changes ("Beta") so you can use the repo to test all open changes

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Mar 22, 2018 via email

@bell07
Copy link
Collaborator Author

bell07 commented Mar 22, 2018

Bug found picking laptop up and place again results in data loss. Investigating...

@bell07
Copy link
Collaborator Author

bell07 commented Mar 22, 2018

The save of OS state on laptop pickup to itemmeta does work proper now from cached OS

@bell07
Copy link
Collaborator Author

bell07 commented Apr 4, 2018

Added some additional forced sync's: if app changed, 5 seconds idle (as before) or each 15 seconds in usage.

Now the changes are "safe enough" for me to be merged.

Did anyone tested the changes? Please take additional tests after the last changes. If nothing bad happens, the change could be merged.

I realize that we can be held responsible for data security of in laptop stored informations, if a bug deletes the whole data of all laptops :-/

@Grizzly-Adam
Copy link
Contributor

Grizzly-Adam commented Apr 4, 2018 via email

@bell07 bell07 merged commit 1d063c0 into Gerold55:master Apr 26, 2018
@bell07 bell07 deleted the performance_boost branch April 26, 2018 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants