Raised This Month: $51 Target: $400
 12% 

How big a file can be before it starts causing lag ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 09-15-2009 , 03:46   How big a file can be before it starts causing lag ?
Reply With Quote #1

I have a custom ban plugin that reads info at every client_connect and compares it with the one written in file, and that file now contains about 500 lines, so i wonder how big it can become before its start to lag when its being read, or theres no such limit ? Also if it starts causing lag, how can i know for sure that its because of that ?
__________________

Jack86 is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-15-2009 , 03:51   Re: How big a file can be before it starts causing lag ?
Reply With Quote #2

It depends on how it writes in the file. If you use Nvault/SQL database as a store system it should work fine.
If you use a textfile then it is possible that it will lag more and more when this will become bigger. I don't know exactly as a number of lines, but you can do a overclock of the plugin.
(Fill the file with many many lines by copying the 500 lines and repasting them again and again to see what happens)
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
purple_pixie
Veteran Member
Join Date: Jun 2007
Location: Winchester, England
Old 09-15-2009 , 05:05   Re: How big a file can be before it starts causing lag ?
Reply With Quote #3

Here's a hint: Don't re-read the file every time a player connects ...

Why not just read it when the map changes?
And store it in memory?

That's just basic programming sense ;-)
purple_pixie is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:49.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode