Re:Show HN: Unity MMORPG Boilerplate – Multiplayer in Unity ...
by atraac on Sunday May 31, 2020 @04:55AM
(#23368213)
var user = db.Users.ToList().Find(x => x.Name.Equals(name));
It's even worse. This will literally retrieve all Users into memory and then iterate over it. Every time you want to find this single one.
Looks like the person who wrote it never actually wrote a single backend server using Entity Framework. It also does so synchronously, while async method is available. This means that this thread will be locked until it finishes this IO and won't be able to process anything else.
It's even worse. This will literally retrieve all Users into memory and then iterate over it. Every time you want to find this single one. Looks like the person who wrote it never actually wrote a single backend server using Entity Framework. It also does so synchronously, while async method is available. This means that this thread will be locked until it finishes this IO and won't be able to process anything else.