SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 06/07/2016, 05:04 AM   #11
Ritzy2K
High-roller
 
Ritzy2K's Avatar
 
Join Date: Jun 2014
Posts: 1,698
Reputation: 168
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Wooooooo!! Good work there!
__________________
Ritzy2K is offline   Reply With Quote
Old 06/07/2016, 12:56 PM   #12
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 862
Reputation: 290
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Give me reasons why someone would prefer to use gini over other INI processors which have WAY WAY WAY more features and is WAY WAY WAY faster.

Quote:
Originally Posted by Gammix
This is faster, a lot than DINI
You are competing in the wrong world. Start bench-marking with y_ini or eINI. Your include provides far less features and is slower. You MUST beat y_ini in performance if you want to keep the include this simple if you WANT people to use it.

By just looking at your code, I can guarantee you that gini is AT LEAST 10 times slower than y_ini.

The only interesting feature I see is the timeout feature.

You'd do better if you would have forked the existing INI Processors and added new features to it.

strunpack? Why even save memory? Just give it away or at least keep it optional. Most servers have many GBs of memory and the memory saved by packing strings is insignificant.
Yashas is offline   Reply With Quote
Old 06/07/2016, 01:15 PM   #13
GhostHacker
Banned
 
Join Date: Jan 2016
Location: Inside a dark cave Reputation: 3089
Posts: 161
Reputation: 28
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

how can it be faster than Yini im pretty sure its slower than you claim to be 1 star from me
GhostHacker is offline   Reply With Quote
Old 08/07/2016, 12:43 AM   #14
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,723
Reputation: 780
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Quote:
Originally Posted by Yashas View Post
Give me reasons why someone would prefer to use gini over other INI processors which have WAY WAY WAY more features and is WAY WAY WAY faster.
For this:
"Only for the sake of those who still use DINI, switch your gamemodes to this."

INI is not preferred for database, i suggest using SQL and my EasyDB is pretty powerful. I only use INI for initializing data or configuration files.



Quote:
Originally Posted by Yashas View Post
You are competing in the wrong world. Start bench-marking with y_ini or eINI. Your include provides far less features and is slower. You MUST beat y_ini in performance if you want to keep the include this simple if you WANT people to use it.
I haven't even performed any speed tests until now and this an old library of mine just polished a bit.
(I take my statement back about its speed, dini2 is really fast)



Quote:
Originally Posted by Yashas View Post
The only interesting feature I see is the timeout feature.
If you want a syntax as of DINI and want no script changes but to switch to a faster one, this is the best way i can think of.



Quote:
Originally Posted by Yashas View Post
You'd do better if you would have forked the existing INI Processors and added new features to it.
New features to INI processor is just a waste of time, your eINI is having load features but they are useless to have, just get an idea from the number of users. SQL is much easier option for that.




Update v1.2:
- Fixed reading file bug (file was closed before actually reading data!)
- One global timer to handle instances/opened INI files
- Removed INI_CONVERT_DINI, the script auto converts DINI functions



EDIT: The thread will be renamed to DINI improved.
__________________

Last edited by Gammix; 08/07/2016 at 08:23 PM.
Gammix is offline   Reply With Quote
Old 08/07/2016, 04:54 AM   #15
Kar
High-roller
 
Kar's Avatar
 
Join Date: May 2010
Location: Black Asylum
Posts: 3,199
Reputation: 494
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Quote:
Originally Posted by Yashas View Post
Give me reasons why someone would prefer to use gini over other INI processors which have WAY WAY WAY more features and is WAY WAY WAY faster.



You are competing in the wrong world. Start bench-marking with y_ini or eINI. Your include provides far less features and is slower. You MUST beat y_ini in performance if you want to keep the include this simple if you WANT people to use it.

By just looking at your code, I can guarantee you that gini is AT LEAST 10 times slower than y_ini.

The only interesting feature I see is the timeout feature.

You'd do better if you would have forked the existing INI Processors and added new features to it.

strunpack? Why even save memory? Just give it away or at least keep it optional. Most servers have many GBs of memory and the memory saved by packing strings is insignificant.
Theres nothing wrong with this concept, ALOT of scripts out there still use dini, people can just include this instead of dini and speed up their file functions.

Everything must be criticized in this place.. lmao.
Kar is offline   Reply With Quote
Old 08/07/2016, 05:20 AM   #16
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,723
Reputation: 780
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Quote:
Originally Posted by Kar View Post
Theres nothing wrong with this concept, ALOT of scripts out there still use dini, people can just include this instead of dini and speed up their file functions.
That's exactly what this include is all about. In the next update, i'll rename it to Improved DINI and also restructure a bit.

There's no point in inventing another INI processor with useless features.
__________________
Gammix is offline   Reply With Quote
Old 08/07/2016, 06:37 AM   #17
Romz
High-roller
 
Romz's Avatar
 
Join Date: Jun 2013
Location: Ukraine
Posts: 1,015
Reputation: 55
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Well done, great!

I created theme in Russian forum: link (This is not advertising!), don't you mind?
Romz is offline   Reply With Quote
Old 08/07/2016, 02:43 PM   #18
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,723
Reputation: 780
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Quote:
Originally Posted by Kolstin View Post
Well done, great!

I created theme in Russian forum: link (This is not advertising!), don't you mind?
You might want to update it.


Update v2.3:
- Thread name changed to
Quote:
dini2.inc - Improved DINI processor with multi file support and faster
- All dini functions included (there are no new functions, you can now actually use DINI functions to manage INI files)
- Removed packed strings
- Speed improvements
__________________

Last edited by Gammix; 08/07/2016 at 05:34 PM.
Gammix is offline   Reply With Quote
Old 08/07/2016, 05:35 PM   #19
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,723
Reputation: 780
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

Y_INI vs. eINI vs. DINI2
If the benchmarks are wrong, you may share yours or correct them, i haven't really used Y_INI or any INI processor.

Benchmarks code:
Code:
#include <a_samp>

#include <YSI\y_ini>

#include <eini>

#define INI_FILE_TIMEOUT (3000)
#include <dini2>

main()
{
	new s, e;

	// Y_INI
	// Writing
	s = GetTickCount();

	new INI:handle = INI_Open("Test.ini");
	for (new i; i < 100000; i++)
	{
	    INI_WriteString(handle, "Set1", "Gammix_Changed");
	    INI_WriteString(handle, "Set2", "Gammix_Changed");
	    INI_WriteString(handle, "Set3", "Gammix_Changed");
	    INI_WriteString(handle, "Set4", "Gammix_Changed");
	    INI_WriteString(handle, "Set5", "Gammix_Changed");
	    INI_WriteString(handle, "Set6", "Gammix_Changed");
	    INI_WriteString(handle, "Set7", "Gammix_Changed");
	    INI_WriteString(handle, "Set8", "Gammix_Changed");
	    INI_WriteString(handle, "Set9", "Gammix_Changed");
	    INI_WriteString(handle, "Set10", "Gammix_Changed");
	}
	INI_Close(handle);

	e = GetTickCount();
	printf("[Y_INI] Write string to 10 fields 100000 times -> %i ms", e - s);

	// Reading
	s = GetTickCount();

	for (new i; i < 100000; i++)
	{
        INI_ParseFile("Test.ini", "LoadFile");
	}

	e = GetTickCount();
	printf("[Y_INI] Read string from 10 fields 100000 times -> %i ms", e - s);



	// eINI
	// Writing
	s = GetTickCount();

	handle = INI::OpenINI("Test2.ini", INI_WRITE);
	for (new i; i < 100000; i++)
	{
	    INI::WriteString(handle, "Gammix_Changed", "Set1", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set2", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set3", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set4", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set5", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set6", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set7", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set8", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set9", "");
	    INI::WriteString(handle, "Gammix_Changed", "Set10", "");
	}
	INI::CloseINI(handle);

	e = GetTickCount();
	printf("[eINI] Write string to 10 fields 100000 times -> %i ms", e - s);

	// Reading
	s = GetTickCount();

	handle = INI::OpenINI("Test2.ini", INI_READ);
	for (new i; i < 100000; i++)
	{
	    INI::ReadString(handle, "", "Set1", "");
	    INI::ReadString(handle, "", "Set2", "");
	    INI::ReadString(handle, "", "Set3", "");
	    INI::ReadString(handle, "", "Set4", "");
	    INI::ReadString(handle, "", "Set5", "");
	    INI::ReadString(handle, "", "Set6", "");
	    INI::ReadString(handle, "", "Set7", "");
	    INI::ReadString(handle, "", "Set8", "");
	    INI::ReadString(handle, "", "Set9", "");
	    INI::ReadString(handle, "", "Set10", "");
	}

	e = GetTickCount();
	printf("[eINI] Read string from 10 fields 100000 times -> %i ms", e - s);
	


	// DINI2
	// Writing
	s = GetTickCount();

	dini_Create("Test3.ini");
	for (new i; i < 100000; i++)
	{
	    dini_Set("Test3.ini", "Set1", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set2", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set3", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set4", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set5", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set6", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set7", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set8", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set9", "Gammix_Changed");
	    dini_Set("Test3.ini", "Set10", "Gammix_Changed");
	}
	dini_Timeout("Test3.ini");

	e = GetTickCount();
	printf("[DINI2] Write string to 10 fields 100000 times -> %i ms", e - s);
	
	// Reading
	s = GetTickCount();

	dini_Create("Test3.ini");
	for (new i; i < 100000; i++)
	{
	    dini_Get("Test3.ini", "Set1");
	    dini_Get("Test3.ini", "Set2");
	    dini_Get("Test3.ini", "Set3");
	    dini_Get("Test3.ini", "Set4");
	    dini_Get("Test3.ini", "Set5");
	    dini_Get("Test3.ini", "Set6");
	    dini_Get("Test3.ini", "Set7");
	    dini_Get("Test3.ini", "Set8");
	    dini_Get("Test3.ini", "Set9");
	    dini_Get("Test3.ini", "Set10");
	}
	dini_Timeout("Test3.ini");

	e = GetTickCount();
	printf("[DINI2] Read string from 10 fields 100000 times -> %i ms", e - s);
}

forward LoadFile(tag[],key[],value[]);
public LoadFile(tag[],key[],value[])
{
}

Results:
Code:
[15:59:11] [Y_INI] Write string to 10 fields 100000 times -> 2944 ms
[15:59:19] [Y_INI] Read string from 10 fields 100000 times -> 8173 ms

[15:59:20] [eINI] Write string to 10 fields 100000 times -> 965 ms
[15:59:21] [eINI] Read string from 10 fields 100000 times -> 838 ms

[15:59:21] [DINI2] Write string to 10 fields 100000 times -> 833 ms
[15:59:22] [DINI2] Read string from 10 fields 100000 times -> 870 ms



@Yashas: I guess you were wrong on you claiming this WAY WAY WAY slower. Its alot faster than YINI and step further than eINI even with such syntax it supports.
__________________

Last edited by Gammix; 09/07/2016 at 05:34 PM.
Gammix is offline   Reply With Quote
Old 09/07/2016, 05:01 PM   #20
Dalayma
Little Clucker
 
Join Date: Oct 2015
Posts: 17
Reputation: 0
Default Re: gini.inc - Fast multi file processor with "dini's" syntax

dini_IntSet does not work
Dalayma is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] [I-ZCMD]Improved ZCMD - Fastest Command Processor Yashas Includes 99 23/07/2017 04:23 PM
[Off] Dini2? yurin Português/Portuguese 5 27/11/2016 02:09 AM
[Include] eXtended INI Processor - Fast & Feature Rich INI Processor Yashas Includes 28 01/09/2015 07:45 PM
[INC+FS] Aero File Processor by Luby * Updated! luby Filterscripts 15 14/05/2009 01:07 PM


All times are GMT. The time now is 05:43 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.