Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Database is lagging!

Database is lagging!

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by 99fender   (13 posts)  Bio
Date Tue 01 Apr 2003 11:21 PM (UTC)
Message
Hey,

I got a problem with my MUSHClient. I have about 10 worlds running a computer in MUSHClient on PerlScript.

They are all linked to a main .db file. I have two computers, one is 1.4ghz 128mb RAM, the other is 200mhz 128mb RAM. I bought the second one mainly to keep the 10 worlds up all the time.

The computer itself is fine and quite fast, even the MUSHClient bots are fine themselves. But, when it comes to anything .db linked - it really lags. For instance, one of the Bots would search for a record in the DB and it would freeze mushclient for 5 seconds-odd and then come up with the result again.

This never happened on my 1.4ghz - How can i fix this! (I also had an old 75mhz testing them out for 2 days - this had less lag when it came to the database!!)

Thanx
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 02 Apr 2003 07:08 AM (UTC)
Message
Can you explain about the .db file a bit more? Is this an Access database using the database plugin, or something else?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by 99fender   (13 posts)  Bio
Date Reply #2 on Wed 02 Apr 2003 08:40 AM (UTC)
Message
Erm.. Im not entirely sure, all I know is that - when you open it in word pad, its ALL just text with many spaces between different bits of data. And it's 1000's of lines long..

I edit it in notepad or through MUSH if I ever have to..

It's never been slow accessing it before, just is now.

The .db is a very big one by the way.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 02 Apr 2003 11:32 PM (UTC)
Message
This isn't really a MUSHclient problem - it is based on a script that accesses a very large file.

For a start, you say you have gone from a 1.4 GHz PC to a 200 MHz one. That is 7 times as slow, so you will certainly notice a difference on compute-bound applications.

I am not surprised that a Perl script that scans a text files that is thousands of lines long takes a few seconds. However if you had less lag on your 75 MHz PC then maybe it is a configuration issue. Maybe a different version of Perl, or some other thing like that.

You could try rewriting the database to use a "real" database, there are some examples on this site of using Access databases, or you could use mySQL with a bit more work. This would reduce the need for linear scans of a very large file.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by 99fender   (13 posts)  Bio
Date Reply #4 on Thu 03 Apr 2003 10:35 AM (UTC)
Message
Nick,

http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=38

Perhaps my issue could be related to that? Any suggestions?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #5 on Thu 03 Apr 2003 10:54 AM (UTC)
Message
Could be, hard to say without seeing your triggers.

Go into the configuration screens, "info" sub-screen, and see how much time (in seconds) the triggers have taken. If it is a lot for newly-opened world (eg. more than a few seconds), then look at individual triggers. Each one will list its execution time. If you find one that seems grossly more than the others (eg. most take 0.05 seconds, one takes 20 seconds) then take a close look at that one.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by 99fender   (13 posts)  Bio
Date Reply #6 on Thu 03 Apr 2003 11:05 AM (UTC)
Message
Nick!

How do you find individual execution time?!

Thanx
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #7 on Thu 03 Apr 2003 11:48 AM (UTC)
Message
Edit the trigger, the time it has taken to execute (and the number of executions) are on the dialog in the middle somewhere.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


31,365 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.