Log in

View Full Version : How about make SRL a plugin?



solarwind
11-08-2006, 11:40 PM
I was wondering if we port SRL as a plugin, we can make our scripts a whole lot faster and more efficient. For me, it takes about 400 milliseconds every time I run a SRL script to "compile" SRL. This gets increasingly annoying as there is a lot of lag. Is it possible to compile SRL into a plugin?

Tonekray
11-08-2006, 11:49 PM
400 Milliseconds isn't very long... and I really don't think porting it into a plugin will do any thing better. But if your right we could make SRL work for computers with Pentium 2 and 3 comp.

solarwind
11-09-2006, 12:09 AM
400 Milliseconds isn't very long... and I really don't think porting it into a plugin will do any thing better. But if your right we could make SRL work for computers with Pentium 2 and 3 comp.

Yeh, 400 millisconds isn't too long for once per script, but remember, you're constantly calling functions like MMouse, Mouse and so on which take a lot of time to interpret for SCAR. If you read the file in the plugins, it says it's good to make plugins for optimised functions. It'll make it incomparably faster to run from a plugin. Also, you wouldn't need to recompile every time you run a script or reinterpret every time you call a function. It's a good project. Also, I bet we can bundle it all into one file, which makes distribution and installation much easier.

WhiteShadow
11-09-2006, 12:18 AM
Easier to edit in .Scar.

Plus, I can openly see and leech codez easily. (:

Infantry001
11-09-2006, 12:25 AM
lol im with WhiteShadow

Boreas
11-09-2006, 12:40 AM
How bout you put mmouse and everything it needs into a plugin, (call it mmousep or something) and run some speed tests. If it's a lot faster than maybe it would be worth putting laggy stuff in a plugin. Until I see results like that, how it is works now is fine. SRL already has plugins for things that need to be plugins, so theres a reason everything else is .scar.

Distribution isn't much of an issue since rar is one file.

Also as WhiteShadow said, I dig around SRL a lot. I guess this doesn't apply to script users that don't script.

As for speed, computers differ anyway, so it will never be perfect. But the way scripts are written (and the functions/procedures) are getting better and better.

KuJi
11-09-2006, 01:15 AM
Hm, so that's why this does incredible lag. Probally due to the mass amount of includes in the SRL file.

How would one go about making this stuff into a plugin?

lardmaster
11-09-2006, 02:35 AM
i like editting my version of SRL.... i call it LardRL (: i was wondering, what is the deal with plugins, how do they work and how do you call them in a script?

solarwind
11-09-2006, 02:53 AM
i like editting my version of SRL.... i call it LardRL (: i was wondering, what is the deal with plugins, how do they work and how do you call them in a script?

Lol. Plugins are basically "compiled" includes, i guess. Since SCAR has to constantly interpret the source code, it's very very very slow (speaking in computer terms). If we could compile it like any other normal program or a a shared library and call it normally, it would be way way way faster (again, speaking in computer terms). I guess you can call them normally since Pascal is a simple language. In C you have to load the shared libraries and call their functions. In SCAR I think all you have to do is call.

WhiteShadow
11-09-2006, 07:03 AM
Hm, so that's why this does incredible lag. Probally due to the mass amount of includes in the SRL file.

How would one go about making this stuff into a plugin?

The only lag I know of is some random solvers.

SRL is a huge include yes, but people mainly only use core and maybe some others, so that's cuts it down alot. The amousnt of files doesn't have anything to do with it. It compiles in msex on my comp. no problem.

EDIT:

I find this idea quite stupid.

Boreas
11-09-2006, 07:09 AM
writeln('SRL compiled in '+inttostr(ms)); prolly takes longer than the compiling

WhiteShadow
11-09-2006, 07:13 AM
Let's do one of them PRO/CON thingys.


PRO
+ A little faster.

CON
- No longer open source
- Hard to edit
- Have to use a manual to find procedures
- Weird organization for a library to be a plugin
- Wasn't that slow anyways, I actually didn't find it slow at all.
- I bet there are lots more.

solarwind
11-09-2006, 07:40 AM
The only lag I know of is some random solvers.

SRL is a huge include yes, but people mainly only use core and maybe some others, so that's cuts it down alot. The amousnt of files doesn't have anything to do with it. It compiles in msex on my comp. no problem.

EDIT:

I find this idea quite stupid.


Lol, dude, programming is about efficiency. Just because some people have like quad cores, doesn't mean we can just waste processor time because they have multiprocessors. Some of us are still stuck with a pentium 3 (not me, just an example). For those people still stuck with something lower thatn 2 GHz, we need efficiency. Hey, I'm running a Centrino 1.8 GHz with ATI Radeon x300 128 mB hypermemory. It's not too fast compared to what you guys probably have. It's a laptop, c'mon. That's why I (and probably some other people as well) are interested in making this into a plugin (to speed things up). It's an idea.

Yakman
11-09-2006, 04:32 PM
i dont think its a good idea because it wouldnt be so open source anymore, for a faster include, its really not worth it. and i bet we would all have to learn delphi to use it. theres also a small chance one of the devs might turn rouge and put something weird in the plugin

KuJi
11-09-2006, 08:35 PM
What if they just gave us the source of the plugin and we just needed to compile it?

Would allow them to get rid of key loggers, would still be open source etc... and faster ;)

WhiteShadow
11-09-2006, 08:50 PM
Lol, dude, programming is about efficiency. Just because some people have like quad cores, doesn't mean we can just waste processor time because they have multiprocessors. Some of us are still stuck with a pentium 3 (not me, just an example). For those people still stuck with something lower thatn 2 GHz, we need efficiency. Hey, I'm running a Centrino 1.8 GHz with ATI Radeon x300 128 mB hypermemory. It's not too fast compared to what you guys probably have. It's a laptop, c'mon. That's why I (and probably some other people as well) are interested in making this into a plugin (to speed things up). It's an idea.

It's effiecient already. Pup's boxsolver the pictures are in plugin, it's still RLY slow. I bet it would help alot but plugin doesn't just mean "omg spped". If your computer was rly that slow. That SRL is a huge problem for you, then you should just change your computer. You wouldn't even be able to browse SRL like this probably! Actually the main reason scripts lag isn't even SRL. It's the script itself, people use big bitmaps and everything. You want to change everything into a plugin, I don't get what SCAR is anymore. :[

I use a laptop, too btw. Maybe you should try deleting all that shit you have on your computer or defrag it or something.

lardmaster
11-09-2006, 10:47 PM
wow, lets play attack solarwind!

solarwind
11-09-2006, 11:05 PM
wow, lets play attack solarwind!

What do you mean?

lardmaster
11-09-2006, 11:16 PM
nvm, check out my awesome ms paint pic though!

the blah
11-11-2006, 02:44 AM
Why dont we just put srl(and other miscallaneous scar functions that help) in a dll and let ppl develop their crap in an executable and it will be much faster

solarwind
11-11-2006, 03:30 AM
How about keep everything as it is and just make scar compile into machine code. So it first compiles everything and then runs it as usual. That would be the wickedest option. That would be so cool. It still keeps everything as it is, but it compiles everything, eliminating almost all lag. Imagine that. And how hard could it be to compile? I mean, we have the interpreter, all we need to do is compile.

I wish SCAR would be open source. We could blaze Jagex.

Boreas
11-11-2006, 03:33 AM
I hear Kait is working (slowly) in new version of scar. Whether he makes changes that drastic I dunno. But I'm guessing increased speed will be one of his goals (amongst other things like functionality features etc), somehow someway he'll prolly make it faster. For now, we can improve scripts.

da_professa
11-16-2006, 05:59 AM
lol lardmaster you are so random... What pict are you talkin abt btw...lol just made me laugh, how u defended your self so quick :P...

anyway when ever I get lag in scar.. It's mostly because of my or someone else's script.. SRL hasn't been laggin me.. but my comp is pretty fast..so maybe thats why.. Oh btw 400 ms is less than a second, and that's not a lot, but from a computer's point of view.. I know but stil..........

solarwind
11-16-2006, 01:10 PM
Oh, how much faster it could be, and all we have to do is let SCAR compile first. That's all. Keep everything the same and just SCAR make a temporary binary.

Boreas
11-16-2006, 04:50 PM
I dunno. If you know how to do that stuff then do it to a couple functions and test em.

solarwind
11-16-2006, 09:28 PM
Ok, yeah, making it a plugin is stupid............................................ ................. My bad.