It has become apparent to me that there is a lot of fps lag in the new market. I’m usually at a steady 40 fps but when I warp to the market I drop to 5-10. This may seem it is the shops, or buildings to blame but it is actually the item frames.
You see, item frames are entities in Minecraft, not a block. This basically means that an item frame would cause the same amount of stress as a mob. Pressing F3 can show there are 120 item frames loaded at the spawn of the NewMarket. Since that the NewMarket has only been there shortly, it is bound to increase and so is the lag. So what can we do about it?
We can limit the amount each shop can have. I’m thinking around 10 so they can still show off what they have while not causing a lot of lag. There can also be replacements like signs and blocks.
So who’s with me?
Tl;dr Item frames cause lag, the ones in the market should be limited.
As far as dyes you can put a sign that says what the dye is. You could also put colored wool/clay as well. It doesn’t help having item frames for potions.
Redstone lighting shouldn’t be an issue as long as it is static. However with item frames it may as well be equal to having 100 sheep running around in the market because that is also an entitie. Plus this market only was made less than 2 weeks ago. It is only bound to get worse.
If you really think eliminating item frames is the problem youre wrong. The market had terrible lag since the first day it was put in survival. If you want an honest reason to why it lagging I can give you a whole list starting off with the fact that theres a ridiculous amount of unnecessary redstone scattered around every walkway and shop.
I installed X-Ray to show you how much effort the market designer put into building the market. Redstone lamps in general cause lag because they have to be powered constantly. This is less then a quarter of the market. There are a minimum of 76 (most shops have more then 76) unnecessary redstone blocks per shop. Theres around 200 shops if I remember correctly which means there is at least 15,200 unnecessary redstone blocks in the market (and thats being ridiculously generous). The real reason why your markets lagging is due to poor craftsmanship.
Wowzas, that does definitely seem unnecessary. Could we may get a W/E to get rid of the redstone blocks in the market? That would help it I’m pretty sure.
I also did an experiment earlier today. I went to creative in a desert and made a 10 by 10 wall of item frames, some with items in them. I walked away until I couldn’t see them and was at 55 fps or so when they weren’t rendered. Once I went towards them and they appeared I went and stayed down at 24 fps. We have a lot more than 100 in the market at any point there. This is just my results.
I will not believe Redstone blocks cause any FPS lag. This is partly because it’s rendered just like every other block with the exception of behaving like a Redstone torch. Saying a Redstone block causes lag is like saying a stone block causes lag. Redstone lamps do not cause FPS lag unless they are strobing. Find me evidence of this and I’ll take your word for it, however saying that blocks cause it is dumb due to MCs rendering code only being majorly impacted by either heavy entity use or constant light recalculation (Strobing/loops). Your argument is invalid Nam and I’ll prove with Math, bigO, or graphics calculation if you don’t believe me. Yes the market contains extraneous amounts of redstone, John and I did this to due to us feeling that it should be solid and not only randomly placed power sources. Call it poor craftsmanship if you’d like, the community voted and decided they enjoyed mine the most. However you still feel the need to insult my Market or even fallaciously insult me. Do I insult your market of bad craftsmanship? No. Although I feel like I should insult you of bad sportsmanship.
Pie has the best method of testing so far. Is it difficult to try an are with a lot of frames vs an area with a lot of redstone blocks? While the redstone theory sounds plausible at first, there is no given evidence. You can’t test them in the same area as the frames without ruining the test.
Also, most if not all of those redstone blocks are not visible. Thus, it’s not aesthetic design that’s the issue here, but possible side effects of lighting choice. What Nam said came off as a direct insult, but it could have meant design in the non-visible areas. I’d like to think the latter.
You can also go to the far end of the market. Near to none of the item frames are loaded and it is considerably less laggy. The redstone blocks may have a small difference. (Like 5 fps or so) I still think the main culprit here is the item frames.
Also in one of Keralis’ videos he was talking about his server cutting down on their item frame usage due to it causing lag for the players.
“Saying a Redstone block causes lag is like saying a stone block causes lag.”
I found an article back when they released 1.5 about whether or not redstone blocks would cause lag. I wish I still had the article because it It explained the reasoning in more detail but I couldnt find it. I do remember the key points of it tho. Powered Redstone, Redstone torches, Powered Levers, Powered Rails, and Redstone Blocks ARE causes of lag. Because they are a gateway objects meaning they are constantly checking for updates next to them. Like if you place a lamp by a redstone block, it knows that its suppose to power the lamp. Its the same concept with how a villager will stare at you when your within a certain distance of them. Or why mobs will only move, spawn, or make sound when your in a certain distance of them. They are constantly checking for updates (in their case players).
“I’ll prove with Math, bigO, or graphics calculation if you don’t believe me.”
I dont believe you and I’m actually very interested in how you could possibly calculate something as ridiculous as that. Please explain in great detail.
“the community voted and decided they enjoyed mine the most.”
-Really? They enjoy your market? You must not have heard how people really feel when youre not on. And lets face it… You’ve got a lot of ass kissers who would have voted for a turd with your signature on it. Everyone says I’m dumb because I dropped out of the competition. Even though I have my reasoning’s I’m starting to agree with them.
“MCs rendering code only being majorly impacted by either heavy entity use or constant light recalculation (Strobing/loops).”
-Finally something I can agree with. in case you dont know what a loop is, loops are not constantly checking for updates like redstone blocks do. Loops are constantly updating which is why Redstone Blocks dont cause as much lag as loops when alone.
“John and I did this to due to us feeling that it should be solid and not only randomly placed power sources”
-then why not fill the useless redstone with a different block like wool? why leave 3 blocks of space?.. Seems legit.
Im sorry if me saying the market was made with poor craftmanship came off as an insult but it was merely constructive critisim. I know your a good builder and a smart kid which is why I expected a bit more thought and detail would have came out of you. It semed like you just whipped it out of your ass because you only spent a few hours on it. Clearly your market was poorly made and I think deep down inside even you can agree with that.
One of the major issues in Minecraft is the light engine. IIRC, light is calculated from the topmost blocks on player systems. The server handles no light calculation and it is all handled by client side calculations. Light has a maximum radius from the sun at a total of 15. Assuming the code hasn’t changed since 1.6, It’s calculated by hitting a block and working light levels in a recursive function. This loops out in a calculation of o(15^2(n)) with N being the number of light calculations per tick. However, doing this every tick is quite damaging on a system, so many light formations are loaded into memory upon first joining a world. An example of this are the black lightless voids you see on cliffs occasionally. However, they are fixed when they are called on by events triggered by the player. Examples of events that cause light recalculation are Block breaking, Block Placing, Entity Placing, and some forms of texture rendering.
Redstone, again IIRC, is recursive. However, it functions a little differently. A line of red stone will be calculated on a single game tick. It is only recalculated when it is turned off or something interacts with it. Redstone is, unlike light, handled by the server. This is why whenever you teleport to certain places, red-stone machines powered by sunlight are calculated. Not because they constantly calculate for every player, but rather because you’re forcing the server to recalculate the redstone that has been loaded into the chunk memory. The calculation for redstone levels is o(N^analogue-strength).
With this being said, I’d like to point out that items such as Redstone blocks and torches only update when they are either loaded into server memory or are interacted. Essentially, a redstone block powering a lamp will NOT be forced to recalculate every tick, but rather are only recalculated when someone interacts with them, they are loaded, or another redstone force interacts with them. The market has no loops, and has no constantly updating redstone, meaning that my redstone blocks are not an issue. They can, however, be an issue in the event that a player has a redstone loop. A loop would mean constant recalculation on not only the server, but the client side in the form of light physics. This is not the case.
As pie has proposed, the issue lies within the overpopulation of item frames, which are NOT registered as blocks. They are registered as entities. Ever loaded in slowly and saw all of the little item frames around you before you saw the blocks? This is because mine crafts code loads entities that are not visible. This also means that all entities around you are constantly loaded, even if you cannot see them. Blocks are not loaded like that.
Another thing to note is that entities are rendered differently, and more graphically intensive, than blocks.
At the original copy of the market, I get 43fps.
At the survival copy, I get 27fps.
The amount of red stone blocks at the survival copy is the same, if not less, than the original.
Tl;dr Redstone blocks and Redstone lamps do not cause FPS lag.
Edit: On a side note, FPS decreases whenever I render I view a shop that contains a plethora of item frames.
Well played and a solid explanasion. But I think you avoided the fact that powered redstone of any sort is constantly checking for updates which is a cause of the lag. Item frames may be part of the lag issue but they arnt the entire problem. In fact lets test that theory. There arnt any item frames in your creative market right? Strictly for experimental reasons Id appreciate everyone to go to Hards market in creative, find a long walkway in the market, then start running. You will notice that you start jittering and skipping. Then, if you still dont believe me you may go to my market and do the same test and I garuntee you will notice a huge difference in fps because my market uses glowstone lighting instead of redstone lamp and redstone block lighting. Also my market is right next to Hards so the environment that they are built in should not effect your results. I’m not asking you to test it to flaunt that my market is better, I’m asking you to test my theory because our markets are neighbors and it would be a good comparison. Any who, I hope you can figure out what the deal is with your market because I dont know how the hell your getting 27 fps in your market while everyone els is getting 10 or below. Not including optifine users.
Event handling is done server side, not client side. Meaning players experience no lag from event handling. Regardless, event handling is not very memory intensive and doesn’t affect the server much at all.
Event handling is done server side, not client side. Meaning players experience no lag from event handling. Regardless, event handling is not very memory intensive and doesn't affect the server much at all.
Nothing I said had to do with event handling. Stop pulling non sense out of your ass to validate your point. Go ahead and remove all the item frames. Your markets still going to be laggy as fuck. Why not remove your redstone blocks? Its not gonna hurt anyone and its not gonna hurt to try. Plus thats a lot of free redstone youre just giving away to people. On top of that you get the chance to prove me wrong.
I do agree with the free redstone part, though no one on this server is super big into redstone so it really won’t affect the value being really low already.
Plus we don’t need to remove them all. Just the stores that have 10 or more can cut down, those are the areas where it is the laggiest. I really don’t understand why this got out of hand either, I just wanted to fix a problem. We’re all on the same team here.
I’d say it shouldn’t be implemented right at this time. But we should definitely smooth into it by not adding any more item frames if you’ve already exeded the limit.