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

Don't refresh the whole map with every change to a city #1788

Merged
merged 1 commit into from
Jan 29, 2023

Conversation

lmoureaux
Copy link
Contributor

The refresh had been introduced to highlight the correct tiles when switching city from the city dialog. Detect such changes and refresh the relevant working areas only.

This improves performance of city management dramatically when using small tilesets or large windows.

Reported by Corbeau on Discord.

Testing:

  • Use a small tileset like Trident (more tiles to refresh)
  • Make sure most of the map is explored and visible
  • Try to manage citizens in a city
  • Notice the reduced latency with the patch

Suggest to backport.

The refresh had been introduced to highlight the correct tiles when switching
city from the city dialog. Detect such changes and refresh the relevant working
areas only.

This improves performance of city management dramatically when using small
tilesets or large windows.

Reported by Corbeau on Discord.
@jwrober jwrober added the back-port back-port candidate label Jan 29, 2023
@jwrober jwrober merged commit a02b71b into longturn:master Jan 29, 2023
lmoureaux added a commit to lmoureaux/freeciv21 that referenced this pull request Jan 30, 2023
Use the generic setup_ui function instead of duplicating its code in get_city.

See longturn#1788.
jwrober pushed a commit that referenced this pull request Jan 30, 2023
Use the generic setup_ui function instead of duplicating its code in get_city.

See #1788.
lmoureaux added a commit that referenced this pull request Feb 2, 2023
Use the generic setup_ui function instead of duplicating its code in get_city.

See #1788.
@lmoureaux lmoureaux deleted the bugfix/citydlg-performance branch February 4, 2023 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-port back-port candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants