User Name
Password

Go Back   Planetarion Forums > vChange Tracker > Fleet ETA and ticker
Register FAQ Members List Calendar Arcade Today's Posts

Change ID: 31 Type: Todo
Title: Fleet ETA and ticker Status: New
Severity: Minor Version: N/A - Future Feature
Assigned To: Unassigned

[Add Response] | [Subscribe]

Planetarion Support Team Member Will
15 Sep 2009 13:15
I noticed this rounds ago and it seems to still happen... during a tick, fleets on gal status change ETA one at a time as the ticker processes them. This suggests to me (and please correct me if I'm mistaken) that the current ETA of every fleet is stored in the database and decremented by the ticker as it runs through.

I think this is inefficient and propose that instead of storing the ETA in the database, the ETA is calculated by subtracting the current tick from the landing tick - this way all fleet ETAs appear to be decremented simultaneously and 1000+ database operations are removed from the ticker. Similarly for the launch tick, rather than having a prelaunch ETA that is decremented in the database (I'm guessing again), it could be calculated on the fly and the fleet only appears on gal status when current tick > launch tick.

Advantages:
- Ticker faster because it only needs to do anything with fleets if they are going into combat.
- It will be impossible for fleets to have the incorrect ETA while the ticker is working. Overview, missions, gal status and ally def pages, scans, reporting incs either by report button or pasting to defchans/external tools will all be reliable during a tick.

Disadvantages:
- Inaccuracy during the tick might be good?
- Maintenance of old code. /o\

Howling RainFreedom
8 Jan 2010 12:35
Seems sensible to me - shouldn't be too difficult if the code isn't antiquated (sp?).

PA TeamAppocomaster
20 Jun 2010 10:29
You're right, it is ticked by user id (all fleets heading to user id 1, user id 2, user id 3, etc) and this has forced manually changing the return eta of the fleet depending on user id.

I did look at this a round or two ago and try and speed it up, but it didn't work properly and beta testing was in full flow.
I'll see if I can take that code and use it as a basis for rebuilding the ticker so everything is done at once.

It should simplify things and is a natural progression (we've moved resources, research, construction, alert/security and most production changes to the beginning of the tick rather than on a planet by planet basis).

However, this still doesn't appear to be the thing taking up the most time in the ticker - need to investigate what is causing the problem. It's either to do with the horrible way that the ticker handles landing / returning fleets, or the manual recalc of factories to ensure that any covert ops destroying factories are handled.


[Add Response] | [Subscribe]


All times are GMT +1. The time now is 23:14.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018