I went over for MySQL, can't complain.
Waiting for Database Server to be ready...Quote:
I'm sorry for updating an old post, but just some heads up. I was working with a source that uses completely ini. As I was converting to MsSQL, I noticed this.
Loading NPCs went from ~300ms, to ~12ms. Loading MonsterData+MonsterSpawns went from ~1300 ms, to ~260 ms. Loading map information went from ~1700 ms to ~200 ms. Among other things. This speed improvement should let people know a bit about this.
You really need to look into Task Async. You can do some nasty asynchronus shit without having to spin up new threads!Quote:
iirc, it was never scaled correctly(at about 1-2ms) compared to yours considering you had a lot of other shit going on that my server didnt have done yet.
Console.WriteLine(packet->type + " took 0 ms");Quote:
You really need to look into Task Async. You can do some nasty asynchronus shit without having to spin up new threads!
1005 took 0 ms
1022 took 0 ms
1005 took 0 ms
1005 took 0 ms
1022 took 0 ms
1005 took 0 ms
1005 took 0 ms
1005 took 0 ms
1005 took 0 ms
1022 took 0 ms
1009 took 0 ms
1010 took 0 ms
1009 took 0 ms
1009 took 0 ms
1009 took 0 ms
^ Surrounded by a crapload of mobs.
I need something more sensitive than the Stopwatch class...
I'm going to completely ignore the ridiculous nonsense about using Initialization files as a database, it's like there's some sort of conspiracy involving SQL/Relational Databases that only this section of elitepvpers is in on.Quote:
You really need to look into Task Async. You can do some nasty asynchronus shit without having to spin up new threads!
1005 took 0 ms
1022 took 0 ms
1005 took 0 ms
1005 took 0 ms
1022 took 0 ms
1005 took 0 ms
1005 took 0 ms
1005 took 0 ms
1005 took 0 ms
1022 took 0 ms
1009 took 0 ms
1010 took 0 ms
1009 took 0 ms
1009 took 0 ms
1009 took 0 ms
^ Surrounded by a crapload of mobs.
I need something more sensitive than the Stopwatch class...
More like:Quote:
Console.WriteLine(packet->type + " took 0 ms");
;O
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
Task t = new Task(() =>
{
// Handle packet here
// ...
// ...
// ...
});
t.Start();
stopwatch.Stop();
Console.WriteLine("{0} took {1} ms", msg.MsgType, stopwatch.ElapsedMilliseconds);
I don't know what made you attack me on a personal level but oh well: I do know about Lambdas <- BD not DB mr. I know it all. And yes, essentially thats how I handle most of my packets.Quote:
More like:
Because he's bad.Code:Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); Task t = new Task(() => { // Handle packet here // ... // ... // ... }); t.Start(); stopwatch.Stop(); Console.WriteLine("{0} took {1} ms", msg.MsgType, stopwatch.ElapsedMilliseconds);
Edit:
I give him too much credit, of course he doesn't know about lamdbas, but you get what I mean.
MySQL Embedded Server will probably scale a lot better than SQLite.Quote:
Consider SQLite if you don`t need a remote DB server as well. I used it with my C++/boost source, and it works quite well. ;) You get the speed of a flat-file or even binary database, and all the nice SQL tools.