Skip to content

optimization: remove redundant lastTime setter#1479

Merged
sylvessa merged 1 commit intosmartcmd:mainfrom
sylvessa:optimize/remove-redundant-timer
Apr 5, 2026
Merged

optimization: remove redundant lastTime setter#1479
sylvessa merged 1 commit intosmartcmd:mainfrom
sylvessa:optimize/remove-redundant-timer

Conversation

@sylvessa
Copy link
Copy Markdown
Collaborator

@sylvessa sylvessa commented Apr 5, 2026

Description

Removes a redundant line introduced in #1423. This causes lag on weaker hardware (such as laggy block removing, etc).

Tested on a laptop I have

Changes

Previous Behavior

In minecraftserver::run, lastTime = getCurrentTimeMillis(); would be ran after each tick.

RustDesk_07Hv8eNSIH.mp4

Root Cause

Accidental bug introduction, user thought chunk redstone speedup was caused by a bug but instead was just 4j's weird math.

New Behavior

No more lastTime = getCurrentTimeMillis();. It doesn't break anything regarding tick persistence.

RustDesk_3FYpue8inG.mp4

This also did boost my fps a little bit too

Fix Implementation

Remove lastTime = getCurrentTimeMillis();

AI Use Disclosure

None

Related Issues

@sylvessa sylvessa merged commit c2ea1fa into smartcmd:main Apr 5, 2026
1 check passed
@sylvessa sylvessa deleted the optimize/remove-redundant-timer branch April 5, 2026 17:51
itsRevela pushed a commit to itsRevela/MinecraftConsoles that referenced this pull request Apr 5, 2026
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.

1 participant