RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

A suggestion regarding the disparity of cache-nocache compile times

Ashlar

Sorceror
A suggestion regarding the disparity of cache-nocache compile times

First let me say i truly love the Cache feature.
My problem is that i do not run a server myself, only test scripts.
So all i can really do is admire it's function from afar..

Every single time i make even the smallest change to a script, the entire \Scripts folder needs to re-compile.

I think I might have thought of a wonderful solution to shorten load times for scriptors.

Add a \Workbench (whatever name) folder to the root RunUO folder that compiles at runtime just like the \Scripts folder does. This folder does not get included into the cache (or is cached seperately).

This way, the Scripts.dll cache will be unmodified and the server will not have to recompile all those scripts if they havent changed...(very quick load)
The scripts in the "Workbench" folder will be few, just the ones currently being modified/created and therefore compile time is reduced.

When the script is ready, it can be moved to the custom folder in scripts just like is done now to be added to the next cache.

Thoughts?
 

Phantom

Knight
Your not going to increase the compile times, perhaps a few seconds but I don't see that its worth going from 30 seconds to 25 seconds to compile the scripts.
 

Ashlar

Sorceror
Phantom said:
Your not going to increase the compile times, perhaps a few seconds but I don't see that its worth going from 30 seconds to 25 seconds to compile the scripts.

hrm, either i am completely off on what i think would happen if this suggestion is implimented or I didn't explain myself well enough.

My computer: Athlon 64, 2.3ghz, 1gb ram, WinXP ( Family computer, lots of extra junk in memory )
If i even change a comma in a script, it takes about 3 minutes to start the server.
If i change nothing and it loads the cache, it only takes about 20 seconds to start the server.

My thinking is:
1. Compile \Workbench - I changed a script, so compile everything in this folder.
2. Compile \Scripts - I didn't make any changes to anything, so just load the Scripts.dll as cache
3. Everything compiled or loaded, server starts.

What i am thinking would happen is that instead of 3 minutes for the server to start, it would take a "small amount of time" longer than 20 seconds....
("small amount of time" depending on the number and size of the scripts in \Workbench)

Unless my thinking is flawed, (entirely possible) time savings would be significantly greater than a few seconds...

P.S. Thanks for replying Phantom, if anyone can tell me i am off my rocker, it's you :)
 

Phantom

Knight
I bought a computer recently, and my compile times are under a minute. Like I said your not going to increase the compile time by alot if you do your suggestion.

But your welcome to prove me wrong...
 

TMSTKSBK

Lord
other half of that is that they all need to end up in Scripts.dll...which means you have to compile everything...unless someone creates a Dev variant of RunUO, which works on two assemblies...
 

Ashlar

Sorceror
I just noticed something.......................... err, i feel like an idiot......

The core already handles multiple assemblies!!!
if ( File.Exists( "Scripts/Output/Scripts.VB.dll" ) )

Checking now! *runs off to find a vb script* ... *runs back growling*

I couldn't find one that worked, so i just renamed a txt file to .vb and added a ' comment inside it:
RunUO - [www.runuo.com] Version 2.0, Build 2368.37047
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...done (cached)
Scripts: Compiling VB.NET scripts...done (0 errors, 0 warnings)
Scripts: Verifying...done (2328 items, 518 mobiles)
Total time (doubleclicked the RunUO.exe to ready to go): about 20 sec.

To keep things fair, i did the same thing for c# (renamed a txt to cs and put a //comment in it.
RunUO - [www.runuo.com] Version 2.0, Build 2368.37047
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Compiling VB.NET scripts...done (cached)
Scripts: Verifying...done (2328 items, 518 mobiles)
Total time (doubleclicked the RunUO.exe to ready to go): about 2 minutes.

The only thing left is to add in that it compiles another folder and makes a dll for it!

To me, this stands as proof of concept Phantom....

 

Phantom

Knight
Comments are NOT COMPILED so your proof is flawed.

Why are you on this quest to prove me wrong exactly?

Even if its faster, its only going to be faster by a small amount of time. Plus what you lose by having to different assemblies will make it not worth it. I really don't feel like trying to explain all the reasons another assemblie is a bad idea.
 

Ashlar

Sorceror
Phantom said:
Comments are NOT COMPILED so your proof is flawed.
There is 'proof' and there is 'proof of concept'...
My 'proof of concept' is repeatable.

Do what i did please:
Have the server compiled so that it will load the cache the next time you start it.
Make a new .cs file in the \Scripts folder and put a comment in it.
Start the server.
It will not load the cache, but instead will compile all the scripts again.

Do the same type of test for a vb script and compare the total times...

I know comments are not compiled, they are comments!
The point is that ANY change to in the \Scripts folder will cause a complete re-compile of that type, ( vb or cs ) and only that type.

Phantom said:
Why are you on this quest to prove me wrong exactly?
This is not a quest and i am sorry if i gave the impression that this is personal.

I was originally intending to simply present an idea to the RunUO team for their consideration.
You didn't think this idea has merit and i respect you and your thoughts about programming.

You said earlier:
Phantom said:
But your welcome to prove me wrong...
Not trying to prove you wrong,
i was just trying to figure out where my thinking was skewed since you didn't think this was a good idea.
Instead of finding why you feel that the idea has no merit,
i found instead something that encourages me to believe that i am on the right track.

Phantom said:
Even if its faster, its only going to be faster by a small amount of time. Plus what you lose by having to different assemblies will make it not worth it. I really don't feel like trying to explain all the reasons another assemblie is a bad idea.
That "small amount of time" is exponential depending on how much processor/ram your computer has and how many scripts you have in the \Scripts folder.
I know of at least one production shard that takes more than ten minutes to compile.

For myself, i am still learning programming, so i restart te server Very, very often.
If i am trying to get an animation sequence right i might restart it 50 times before i am happy with the results.

50x 2 minutes each = 1 hour 40 minutes.
50x 20 seconds each = approx 17 minutes.
That is not a small difference to me.

If i knew vb and c# well enough, i would just write/test all my scripts in vb and then convert them to c#.
That way i wouldn't have to re-compile all the .cs scripts every time i changed a vb script.
But, since i don't know a lick of vb, i think that a new assembily would be a great idea.

Like i stated before, i was intending to just submit an idea, which is why i posted in modification suggestions.
Now i have an idea with a proof of concept.....
 

Phantom

Knight
50x 2 minutes each = 1 hour 40 minutes.
50x 20 seconds each = approx 17 minutes.

Your just making stuff up....

This has no truth behind that statement, like I said another assemblie is not a good idea.
 

Ashlar

Sorceror
Phantom said:
Your just making stuff up....

So you are calling me a liar Phantom?

Phantom said:
This has no truth behind that statement, like I said another assemblie is not a good idea.

If you do not believe me in that i would restart the server 50 times to check and adjust an animation sequence...
too bad because i do.
You have not seen the things that i have been working on lately.

It takes my computer 2 minutes to start the server when the scripts are not cached.
Not making a thing up there, i wish i were.

50 restarts times 120 seconds (2 min) = 6000 sec.
6000 sec divided by 60 (back to minutes) = 100 minutes.
100 minutes minus 60 min ( 1 Hour ) = 40 minutes.
Total time 1 hour 40 minutes.

I admit that i have never started a cached server 50 times.
For me to start my server when it is cached takes 20 seconds, not lying on this either.

So the 17 min total time is
50 restarts times 20 sec = 1000 sec.
1000 seconds divided by 60 = 16.6 minutes which i rounded up to 17.

You have said a couple times that another assembly is not good, you have yet to say why or how.
I really want to know how a third assembly could be so bad as to outweigh the major time savings that i imagine possible from this idea.

This idea suggestion was directed at the RunUO team with constructive comments, discussion and feedback welcome from the community.

I respectfully request that you cease falsely slandering me as a liar and either butt out or constructively respond to this thread for a change.
 

Phantom

Knight
This idea suggestion was directed at the RunUO team with constructive comments, discussion and feedback welcome from the community.

This is a public forum, where does it say I cannot disagree with you?

I respectfully request that you cease falsely slandering me as a liar and either butt out or constructively respond to this thread for a change.

Lighten the hell up.

When you want to talk to me like an adult, and not like you have something to prove, then I will explain why I feel the way I do on the subject.
 

Ashlar

Sorceror
Phantom said:
This is a public forum, where does it say I cannot disagree with you?
Nowhere of course.
I expressed a wish that you would either respond constructively or butt out instead of putting on Phantom airs.
Phantom said:
Lighten the hell up.
Dat's noice.
Phantom said:
When you want to talk to me like an adult, and not like you have something to prove, then I will explain why I feel the way I do on the subject.
If you can re-read the entire thread (excepting this post's "Bite me." remark ) and still feel like it is me that is not acting like an adult then you truely have nothing that i care to hear.

P.S. I have released this idea in code form in Core Modifications\Other as:
[2.0] Workbench Scripts.WB.dll for faster compile times.
Link: http://www.runuo.com/forums/showthread.php?p=555542#post555542

Please direct support issues with this mod there :)
 

Phantom

Knight
If you can re-read the entire thread (excepting this post's "Bite me." remark ) and still feel like it is me that is not acting like an adult then you truely have nothing that i care to hear.

If I ignore that remark, clearly my issue with the way your talking to me his gone, which is what is needed.

To understand why your idea is a bad idea do the following.

Try to access a class using your new exentsion, within the first assemblie. You should get an error, this is one of the major reasons why your original idea is a bad idea. Plus the fact admins are lazy and they will most likely NEVER move their files back and rename them.

Feel free to remove your comments about my view on the subject. It offers nothing to your submission, I wouldn't do that to anyone no matter what my views are.

This is a discussion thread, thats a submission thread, thats not the place for personal views.
 

Sorcerer

Wanderer
Phantom I know a good psychologist that might assist you with your "I'm right wawa why do you wanna prove me wrong?! IM GOOD MAN! I AM RIGHT" complex, and I know a nice departmentstore that can stack you up with a few Always Ultra pads for those days when someone has something constructive to say and you go off like a volcano because you weren't the one to say it.

Grow up
 
Top