Rapid map item display updates cause severe lag for client?

Discussion in 'Plugin Development' started by Cirno, Jul 11, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    I currently have code that projects animated images onto Minecraft maps; which can be seen here. As you may notice; the client was at a constant 100+FPS and played the videos pretty fluidly. However, after the 1.7.9/10 update, I started getting insane amounts of client FPS drops (from 400 to, say, 16). I also went back to 1.7.5 and the same thing occurred. I thought this was a bug with CraftBukkit, so I *gasp* switched to Spigot to test if it had any effect. Spigot did not fix the issue, however, it did "somewhat fix it", as in, it gave a small FPS boost between CB and Spigot. However, the boost was only around 4-5 FPS and is probably negliable.

    I do not know why as to why this happened (I mean, c'mon, how could server software affect client FPS?) and I'm not focusing on developing for Spigot. Reason for bolding was because this thread would probably get locked just for mentioning Spigot.

    That aside, I'm going to assume this is an issue with the client, but I wanted to hear if anyone else had some form of hack or something that fixed the FPS drop.

    Hardware wise; the client computer and server are powerful enough.

    The client computer, in this case, is running an AMD FX 6300 Hexacore@4.19GHz (OC'd), 8GB of RAM (don't recall the speed of it, but lets assume 1600MHz), and a single nVidia GTX 660 Ti. Internet speed is around 3.5MB/s (megabYtes, not megabIts) down and 0.69MB/s up. (inb4TrollDude)

    Server-side, it runs a Intel Xeon L5520 @ 2.27GHz Duel-core (I don't know if hyperthreading is enabled, but lets assume it is), 1GB of RAM (do not know the speed). Internet speed is around 51MB/s down and 11MB/s up.

    The only thing I can think of is throwing in more numbers to Thread.sleep and sleeping in different areas; however, this usually results in choppier and generally degrades the video quality. I know it's possible to get it to not lag, because the video proves otherwise, but this just may be a heisenbug and once I find a way to solve it, it just disappears. Anyone with any ideas?
  2. Offline


    the problem with tread.sleep is that your pausing the whole server. You should use thried.yield because it will allow java to come back to your process after it has done another loop with all the other stuff that is in queue.
  3. Offline

    1Rogue Retired Staff

    That has nothing to do with the issue. FPS drops would indicate something wrong with at least the amount of data being processed (maybe a lot more packets for map updating being sent out?). I'm a bit out of it myself at the moment, but that would be the area to look into afaik.
  4. Offline


    That's the thing I don't understand; the same amount of data is going in and out as I did with the video before. It's the same 16768 bytes going in and out.

    The Thread.sleep calls aren't being ran on the main thread; I have a separate thread for writing out packets that uses it there.

    edit: had a brainfart.
  5. Offline

    1Rogue Retired Staff

    Hmm, perhaps some client code changed? Have you tested with older clients as well?
  6. Offline


    I've tested it with 1.7.5; same results, unfortunately; which is strange, since the video given was recorded at 1.7.5
  7. Offline


    Cirno I assume your plugin also changed from 1.7.5 to 1.7.9 in order to attempt to fix the issue. If so, try reversing some edits to get it running smoothly on 1.7.5 again
  8. Offline


    I dug up an old jar for 1.7.5; unfortunately, I don't know why, but it's doing the same thing, and unfortunately, I wasn't paying attention when I was exporting the 1.7.9 version and ended up overwriting the 1.7.5 one and lost it :/
  9. Offline

    Jade Retired Staff

    *gasp* Unofficial builds can have long-lasting effects that are not predictable! Locked.
Thread Status:
Not open for further replies.

Share This Page