ID:1778560
 
(See the best response by Zasif.)
Even if the game server has been running for a while and is not under load a player can login to the server and Any topic calls they make will go through fine but any winset calls and icon changes aren't displayed until 10-20 seconds after they've connected.

Things that do work during this seemingly clientside lag period:
input/alert/etc
Stat()
sounds
location updates
verbs that don't popup a skin element or html window

Note that this lag time is only for the individual clients that are in this period after logging in for the first time, nobody else experiences any delay during this period.
Is this related to just one of your DM programs or to anything you make?

If it's related just to a single program then you need to check all your related delays. Sounds like you've got a sleep() delay somewhere where it shouldn't be.
A few steps to take to find the source of this problem would be:
•Check for sleeps and loops
  • Check client/New() for sleep statements and loops.
  • Check Login() for sleep statements and loops.

•Debug your program to find out where the problem first occurs
  • Add world << 1, world << 2, world << 3, etc from the time a player connects to the time where the last proc runs. Whichever number doesn't appear is the number you'll have to narrow down to and fix.
  • After you have narrowed it down, run it again with the narrowed world output checks to verify that's the problem. From there, check to see what you can do about the problem.


In response to Xirre
Zecronious wrote:
Is this related to just one of your DM programs or to anything you make?

If it's related just to a single program then you need to check all your related delays. Sounds like you've got a sleep() delay somewhere where it shouldn't be.

It seems to be a thing that plagues every ss13 codebase except SA's LLJK servers.


Xirre wrote:
A few steps to take to find the source of this problem would be:
•Check for sleeps and loops
  • Check client/New() for sleep statements and loops.
  • Check Login() for sleep statements and loops.

•Debug your program to find out where the problem first occurs
  • Add world << 1, world << 2, world << 3, etc from the time a player connects to the time where the last proc runs. Whichever number doesn't appear is the number you'll have to narrow down to and fix.
  • After you have narrowed it down, run it again with the narrowed world output checks to verify that's the problem. From there, check to see what you can do about the problem.



I've looked for sleeps and loops in the client/new and all Login's nothing like that exists.
edit: forum really didnt like quoting your post.
It didn't like my post because I used dd and dt to tab them with some unicode included for bullets. There was no real other way to make a second level list for you while staying in the html rules of the forum. My apologies.

Did you try the world output method? It helps with narrowing your problem.
Best response
Start by disabling system by system not all at once like Names,Object HUDs, Anything that requiers to run at the startup/login process just take them out like they never existed with /*,*/,//. This is the simplest way to find out which one of those causes the problem that ur having, I think.
/client new start 198370
/client set world style 198370
/client preloaded rsc 198370
If the title screen is black, resources are still downloading. Please be patient until the title screen appears.
/newplayer login start 198370
/newplayer finished update login details 198370
/newplayer new player panel 198370
/mob login start 198370
/mob update_login_details 198370
/mob updated world status 198370
/mob called parent 198370
/client called mob login() 198370
/client world update status 198370
/client added admin verbs and showed memo 198370
/client logged client to db 198370
/client sent resources 198370
Changelog has changed since your last visit.
/newplayer sent changelog 198370
Processing Geometry...
Geometry initialized in 1.7 seconds.
Total Simulated Turfs: 25280
Total Zones: 1133
Total Unsimulated Turfs: 364870
Searching for away missions...
No away missions found.
Initializing objects
/newplayer Clicked ready button, sending player an rpane198405
/newplayer Clicked ready button rpane sent 198405
Welcome to the pre-game lobby!
Please, setup your character and select ready. Game will start in 300 seconds
Initializing pipe networks
Initializing atmos machinery.
Initializations complete.
/newplayer received RPANE automated Topic call 198518
In response to Zasif
Zasif wrote:
Start by disabling system by system not all at once like Names,Object HUDs, Anything that requiers to run at the startup/login process just take them out like they never existed with /*,*/,//. This is the simplest way to find out which one of those causes the problem that ur having, I think.

I dont know why this was marked as best response, I can return ..() at the beginning of login and client/new and it still does it.
It had a vote and timed elapsed for new votes.

To be honest I don't follow the log you posted. The numbers at the end of most lines are meaningless without context, and I'm not sure which lines correspond to winsets being sent.
/client new start 198370
/client set world style 198370
/client preloaded rsc 198370
/newplayer login start 198370
/newplayer finished update login details 198370
/newplayer new player panel 198370
/mob login start 198370
/mob update_login_details 198370
/mob updated world status 198370
/mob called parent 198370
/client called mob login() 198370
/client world update status 198370
/client added admin verbs and showed memo 198370
/client logged client to db 198370
/client sent resources 198370
/newplayer sent changelog 198370

Is client/New to mob/Login

/newplayer Clicked ready button, sending player an rpane198405
/newplayer Clicked ready button rpane sent 198405
/newplayer received RPANE automated Topic call 198518


This is the new player mob clicking on a link right after logging in and calling mob/new_player/Topic. From there it sends the same mob a window that upon load will cause the client to send another Topic call signifying the window successfully loaded.
        var/html = {"
<html>
<script language="javascript">
function noErrorMessages () {
window.location.href="byond://?src=\ref
[src]&test=1";
return true
}
noErrorMessages();
</script></html>"}


The numbers at the end of the lines are the world.timeofday, as you can see there is a large delay between being sent the window and the client actually loading the window.

Note that this was done locally, the delay is probably longer when connecting to a remote server due to latency and server load.
I'm not seeing how winset is involved. This is a browse(), not a winset. (Although it'd help if you posted some relevant code.) In many cases browse() is sent as a file, and that will queue up behind file requests. If further resources are being downloaded in the background, there's your answer.
In response to Lummox JR
Lummox JR wrote:
I'm not seeing how winset is involved. This is a browse(), not a winset. (Although it'd help if you posted some relevant code.) In many cases browse() is sent as a file, and that will queue up behind file requests. If further resources are being downloaded in the background, there's your answer.

Revisiting this topic, is there anyway to go about possibly setting file transfer priorities?
In response to Pomf123
If you mean can a browse() be made to transfer ahead of resources, no. Files will download in whatever order they're pushed or requested.