Register for your free account! | Forgot your password?

You last visited: Today at 22:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Choosing a database

Discussion on Choosing a database within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 04/23/2014, 21:05   #16
 
Wolfy.'s Avatar
 
elite*gold: 0
Join Date: Mar 2014
Posts: 219
Received Thanks: 27
I went over for MySQL, can't complain.
Wolfy. is offline  
Old 04/23/2014, 23:05   #17
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by InsomniacPro View Post
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.
Waiting for Database Server to be ready...
Database Server Ready!
Loading Maps...
Loaded Maps in 1780ms
Loading Mobs...
Loaded Mobs in 245ms
Spawning Mobs...
Spawned 59087 Mobs!
Spawned Mobs in 864ms
Loading Npcs...
Loaded: 565 Npcs
Loaded Npcs in 86ms
Loading Items (11k files)...
Loaded Items in 1505ms
Loading LevelExp File ...
Loaded LevelExp in 0ms
Loading StatPoint files...
Loaded Statopints in 4ms
Loading All Shops...
Loaded 25 shops!
Loaded Shops in 6ms
Configuring Scriptengines...
Configured Engines in 6ms
Starting all Threads...
Started Threads in 7ms
Loading Portals...
Loading portal information...
Loaded Portals in 2ms
Starting Socketsystem...
Server Online!

INI's

I see that you already outperform me in some cases. I will now optimize my code to destroy you

My main problem is that every mob, every spawn, every item is one seperate ini. thats how I dumped the TQ Db...
Y u k i is offline  
Old 04/23/2014, 23:14   #18
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
Quote:
Originally Posted by Y u k i View Post
My main problem is that every mob, every spawn, every item is one seperate ini. thats how I dumped the TQ Db...
That's what made mobs/spawns load so slow. I completely obliterated the old loading time.

Btw, once I convert my itemtype loading to sql, you'll cry.
InsomniacPro is offline  
Thanks
1 User
Old 04/23/2014, 23:16   #19
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
How fast do you process packets at this point? Still 30ms per packet? XD
Y u k i is offline  
Old 04/23/2014, 23:19   #20
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
Quote:
Originally Posted by Y u k i View Post
How fast do you process packets at this point? Still 30ms per packet? XD
iirc, it was never scaled correctly(at about 1-2ms) compared to yours considering you had a lot of other **** going on that my server didnt have done yet.
InsomniacPro is offline  
Old 04/23/2014, 23:21   #21
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by InsomniacPro View Post
iirc, it was never scaled correctly(at about 1-2ms) compared to yours considering you had a lot of other **** going on that my server didnt have done yet.
You really need to look into Task Async. You can do some nasty asynchronus **** 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...
Y u k i is offline  
Old 04/23/2014, 23:29   #22
 
InsomniacPro's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 397
Received Thanks: 205
Quote:
Originally Posted by Y u k i View Post
You really need to look into Task Async. You can do some nasty asynchronus **** 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...
Console.WriteLine(packet->type + " took 0 ms");
;O
InsomniacPro is offline  
Old 04/23/2014, 23:40   #23
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Quote:
Originally Posted by Y u k i View Post
You really need to look into Task Async. You can do some nasty asynchronus **** 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.

Anyway since .NET 2.0 Stopwatch is , it doesn't get anymore sensitive.

Try using Elapsed.TotalMilliseconds as it returns whole and fractional milliseconds.
© Haydz is offline  
Thanks
3 Users
Old 04/23/2014, 23:47   #24
 
elite*gold: 0
Join Date: Sep 2013
Posts: 197
Received Thanks: 141
Quote:
Originally Posted by InsomniacPro View Post
Console.WriteLine(packet->type + " took 0 ms");
;O
More like:
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);
Because he's bad.

Edit:
I give him too much credit, of course he doesn't know about lamdbas, but you get what I mean.
SteveRambo is offline  
Thanks
4 Users
Old 04/24/2014, 00:08   #25
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by SteveRambo View Post
More like:
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);
Because he's bad.

Edit:
I give him too much credit, of course he doesn't know about lamdbas, but you get what I mean.
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.
Y u k i is offline  
Old 04/24/2014, 05:02   #26
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,191
I'm a bit disappointed that people are still using flat-file databases as well. Looking at times is insignificant unless it's under high load. From experience, I know how slow a hard drive can get under stress. If you're interested in seeing numbers... I don't have any on flat-files, but I did do some performance testing on my MySQL connection pool system (absolutely nothing fancy, just using the C API). It takes 200-600 microseconds (0.2 -0.6 milliseconds) to initialize the connection (insignificant since that's done on server startup), and then 80-120 microseconds (0.08 - 0.12 milliseconds) to use a connection under heavy stress. MySQL in C# is probably a bit more costly, but it scales very well. Give it a go.
Spirited is offline  
Old 04/24/2014, 08:15   #27
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
Why are we not drawing all the datas we need to store in our database into a bitmap and using OCR to load it again? Pretty neat if you ask me.

Not only would it be handy as fk to just transfer database.png
but you could edit your database in paint.
Super Aids is offline  
Thanks
4 Users
Old 04/24/2014, 11:07   #28
 
elite*gold: 0
Join Date: Sep 2013
Posts: 197
Received Thanks: 141
Quote:
Originally Posted by Y u k i View Post
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.
You did understand why the code I posted was a joke, right?
SteveRambo is offline  
Old 04/24/2014, 12:08   #29


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
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.
KraHen is offline  
Old 04/24/2014, 15:43   #30


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
Quote:
Originally Posted by KraHen View Post
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.
MySQL Embedded Server will probably scale a lot better than SQLite.
CptSky is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Help me with choosing a bot...
05/25/2025 - Archlord - 6 Replies
I have used many times hacks, etc., but never bots, so is there one, which can: 1. Work atm on CM Archlord. 2. Can pickup only uniques (if only unique acces. - better). 3. Wont stuck and die.
Help IN Choosing
06/13/2012 - SRO Private Server - 0 Replies
What Is the best Silkroad Source That Have Every Thing Up to date up
DC AFTER CHOOSING CHAR
03/28/2011 - Silkroad Online - 2 Replies
after i login and try to connect with my char i get a msg "DC from the server"... iam the only 1 with that kind of bug?
Help choosing safe bot...
12/03/2009 - Aion - 5 Replies
Hi guys. I'm looking for a bot that won't get me banned and I'm wondering what you guys recommend... I just started using NoFap for a few levels but I'm not satisfied at all. It doesn't work correctly, it takes a long time looting/switching monsters, constantly runs off course or breaks/crashes, I've been trying to leave it on over night but something usually messes up within 1-3 hours or less. I just want to hit 50 on my main then stop, school absorbs all of time currently though. By...
need help choosing lmao
09/18/2009 - Silkroad Online - 3 Replies
wuts better if i go 90 fire 90 light 90 pacheon for increased nuke range or 90 fire 90 light 90 heuskal for health or should i do 90 fire 90 light 60 pacheon 60 ice for ice def and pacheon and longer nuke range 90 fire 90 light 60 heuskal 60 ice for ice def and hp but pacheon gives farther nuke range and black eagle to help attak...



All times are GMT +1. The time now is 22:28.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.