ID:1816477
 
(See the best response by Tom.)
Problem description:

When running our project through Dream Daemon, Kaio and I are both experiencing a bit of lag when walking around. The movement is smooth when running from Dream Seeker but only happens when we run Dream Daemon with the same code, and play from there, even if it's just the one client connected (the only difference being which program is running the dmb)

Is there any reason this would be happening? Kaio can probably tell a lot more of the techy techy stuff, but we're wondering at this point if it's something with BYOND or if there is in fact something we're doing wrong here.

Thanks in advance for any help anyone can provide!
Dream Daemon has always had this issue. For some reason it simply cannot update things as quickly as Dream Seeker. I made an empty project running at 60 fps in DS, using fraps the see the framerate, and then hosted the same thing in DD. It could hardly keep 40 fps with just me connected and moving around. Even when the framerate is steady you still get what appear to be dropped packets; this also happens when connected to a locally hosted server.

I also noticed that the fps var has some really strange behavior when you can see what it's doing visually. When capped at 30 and hosted in DS it can only go up to 30, but the same thing in DD can spike up to 31 and 32 FPS, even though the cap is 30.

This may be due to how the server updates frames to the client: only when there is something that has updated around them. Standing still and recording in fraps is impossible, as fraps uses the game's framerate; which spikes from 0-2 when idling in my project (due to blinking mobs). DD and DS are constantly fighting to send as few frames to the client as possible, it seems like, and it ends up making things feel awkward in DD. I still don't understand why the FPS can sometimes go over the cap, though.

I'm probably way wrong about the issue here, but this is just what I've observed myself.
In response to Reformist
Reformist wrote:
Dream Daemon has always had this issue. For some reason it simply cannot update things as quickly as Dream Seeker. I made an empty project running at 60 fps in DS, using fraps the see the framerate, and then hosted the same thing in DD. It could hardly keep 40 fps with just me connected and moving around. Even when the framerate is steady you still get what appear to be dropped packets; this also happens when connected to a locally hosted server.

Bear in mind, with DD and DS separated they are not running off the same timer. They try to maintain sync as best they can, though, so we do want any jerkiness to be as minimal as network lag allows. Maybe there are ways to improve on this, though I'm not sure what.
Maybe there are ways to improve on this, though I'm not sure what.

Considering Tom killed the last man that saw the source code after he was done with it, I'm not sure our input on the matter is much good.
In response to Lummox JR
Are there any things we can do specifically to minimize the effects of this? Specifically i'm noticing it most with movement. Maybe there's something undocumented or buried somewheres round here that can give a bit more insight into what exactly is happening so we could try a workaround (or preferably try and minimize the problem itself)
Best response
I think it's just a matter of testing it further, because we should be able to minimize the difference from a DS singleplayer game and a DS/DD instance on the same machine. It may be a matter of better syncing the timers. I can't say the same for DS/DD on a remote machine, but that doesn't sound like it's the main problem here.

I think there are a few bottlenecks that we simply haven't investigated well enough, and it's likely that there are optimizations that could improve things a great deal. Another obvious one (not intending to derail here!) is the resource loading, which I believe does some unnecessary blocking and could be better serviced via another thread instance (or even a third party tool like libcurl).

Anyway, we have made note of it and will take a look.
Alright! Thank you guys so much. Let me know if there's anything else that we can do to help you guys out with this. :)
As usual with potential bugs, the best way to help would be to come up with a demonstration that is setup to really illustrate the problem. This case is pretty simple, but you could get some numbers for us by creating a simple game that does some stuff and shows your framerate, and shows noticeable differences between DS-only and DS-DD local hosting. Ideally we'd like to just run the games in the background so we can debug while running.

SSX (I think) posted something similar in the other direction a while ago, where he had a game that had a bunch of balls bouncing around on the screen, and the performance was much worse in DS than it was in DS-DD local; that made sense because the server was lagging the client. It led to the multithreading attempts, which fixed the problem but broke a lot of other stuff-- we want to revisit that one day as this and other performance-related bugs are still present.