PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
[eCompile] Unused include file
Goto page Previous  1, 2, 3  Next
 
Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Feature Suggestions
Display posts from previous:   

Author Message
Xadhoom



Joined: 26 May 2006
Posts: 30

PostPosted: Tue Dec 05, 2006 4:18 am    Post subject: Reply with quote

You mean you don't want to know if one of your include in unused in one of yours .src files Yukiko?
Even if an unused include doesn't make you ecl bigger, if you modify that include it causes your script to recompile also if not needed.
Ecompile already checkes if function inside an include are used or not, display a warning would not raise your compile time.

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Tue Dec 05, 2006 4:37 am    Post subject: Reply with quote

First, I don't care if a script recompiles or not. Compiling scripts isn't a big time concern of mine. Frankly I am impressed at the efficiency of ecompile. So that makes little difference to me.

Second, I am tired of seeing all those "unused variable" warnings in the ecompile output. I don't want another, in my humble opinion, unnecessary item cluttering up the output from ecompile.

Third, I am not convinced that having an unused include file causes any inefficiencies in POL executing the compiled files. I can see where an unused variable would take up space unnecessarily in the shards data files but unused includes seem to only take up space in the source files and appear to have no adverse effects on the world data file size or script execution.

Author Message
Xadhoom



Joined: 26 May 2006
Posts: 30

PostPosted: Tue Dec 05, 2006 4:53 am    Post subject: Reply with quote

Maybe if you compile 20 scripts isn't a big time, if you have to recompile more then one thousand it is
As already Silver said, it would be more useful to add a line in the .dep files than having a warning, althought if you can see warnings in the ecompile you can go editing the script (removing the unused include) ad you'll never see it again, easy, no?

Having unused include files DOES NOT causes inefficiencies during execution of POL, but it can take lot of time when compiling scripts

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Tue Dec 05, 2006 5:10 am    Post subject: Reply with quote

Xadhoom wrote:
Maybe if you compile 20 scripts isn't a big time, if you have to recompile more then one thousand it is
As already Silver said, it would be more useful to add a line in the .dep files than having a warning, althought if you can see warnings in the ecompile you can go editing the script (removing the unused include) ad you'll never see it again, easy, no?

Having unused include files DOES NOT causes inefficiencies during execution of POL, but it can take lot of time when compiling scripts


But what I don't think you are understanding is, what is being asked for here is to add time to the eCompile process to 'fix' something that you should have fixed already. It's sort of like asking eCompile to check for any endless loops in your code, or any of a thousand other coding mistakes. I would -much- prefer eCompile just took me at my word when I write a script, and do what I ask it to do... and not be spending time double-checking my work. You are asking eCompile to take longer for ME, because you can't organize your includes properly... when there are plenty of other ways to do what you are asking for (like simply commenting-out includes if you suspect they aren't used, and try recompiling to see).



As it is, on my shard, due to the extent that the Housing and Town Stone systems are involved in things (there is very little that does not check something in one or the other of those systems), I very often have compiles that do hundreds of scripts at a time. So, it takes a couple minutes. Big deal. However, in my case, because I've organized all of my includes properly from the start (ok; not 'from the start', because the include mess in WoD/Ackadia was horrid), I know very well that ALL of those scripts really do need to be recompiled, because I know that only includes that are necessary are in each script.

Author Message
Xadhoom



Joined: 26 May 2006
Posts: 30

PostPosted: Tue Dec 05, 2006 5:35 am    Post subject: Reply with quote

Not all shards have only one scripter that works on all scripts. If i'm insure of an include into one script i can remove it and check if it compiles, but doing it for every include in every script is way longer than looking for what ecompile already does.
I repeat it: what ecompile already does
It wouldn't take hours to write in the .dep if the include is used because the functions are already checked, if no function is checked the include is useless.
We're asking for a feature, you already said that if implemented it would be useless to you, like other features are for us. I think we already explained why we want or not this to be implemented, now it's up to the developers Smile

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Tue Dec 05, 2006 7:04 am    Post subject: Reply with quote

Xadhoom wrote:
Not all shards have only one scripter that works on all scripts.


I don't know of any shards that have only one scripter. However, I do know this: having more than one scripter is more reason to keep everything organized... not less.

Xadhoom wrote:
I repeat it: what ecompile already does


Just because you repeat something, does not make it true. I just opened a .dep file, and guess what? No counts of how many identifiers/functions are used in each include. If it already did it, I would have to wonder why it's being asked for, then.

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Tue Dec 05, 2006 7:24 am    Post subject: Reply with quote

Quoting Marilla:
"I don't know of any shards that have only one scripter."

You do now Marilla unless you count the scripts I have borrowed/used from other shards. For most of the life of Hope Lives I have been the sole scripter.

As for the number of scripts and ecompile time...

Output from the last ecompile of my shard:
Compilation Summary:
Compiled 1127 scripts in 141781 ms.

Now unless I am mistaken that's a 141 second compile time or just over two minutes and twenty seconds. I'd say that's not a major delay for 1,127 programs compiling.

There is one thing I think would be neat but only for the sake of curiosity. I wish ecompile gave a total count of all lines compiled in the summary. It would be for nothing else than curiosity. But that's another topic.

Author Message
Developer Silver



Joined: 05 Feb 2006
Posts: 58
Location: Italy

PostPosted: Tue Dec 05, 2006 10:16 am    Post subject: Reply with quote

Marilla wrote:
I just opened a .dep file, and guess what? No counts of how many identifiers/functions are used in each include. If it already did it, I would have to wonder why it's being asked for, then.

That's the feature we're asking for (the alternative, at least): writing to .dep files the hit count of include calls (already done by ecompile scripts parsing)

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Tue Dec 05, 2006 11:05 am    Post subject: Reply with quote

Developer Silver wrote:
That's the feature we're asking for (the alternative, at least): writing to .dep files the hit count of include calls (already done by ecompile scripts parsing)


Xadhoom said (and, let's not forget, repeated) that eCompile 'already does this', referring to counting how many times a function is used. Since it being displayed somewhere is the only way I could imagine he knows that, I looked.

I think he (and also you) is confusing the fact that eCompile never reads functions that are never called, with it having any clue how many times a certain include is used.


What I'm saying is: Why slow down ALL of our eCompiles to count and track this stuff, when the problem is that you have a mess of includes in the first place. That is: You are asking eCompile to go beyond being a compiler, and instead you want it to be an auditor of your code. My hope is that does not happen: I use eCompile too.

Author Message
Developer Silver



Joined: 05 Feb 2006
Posts: 58
Location: Italy

PostPosted: Tue Dec 05, 2006 12:00 pm    Post subject: Reply with quote

Try to put an useless include in a .src file: the generated .dep file will list that file anyway.
This means: ecompile already looks for every included file, so it could be easy and fast to track which .inc are really used (while it parses .src file) and which ones are not.

We're asking a feature to improve our compiling optimization, not to slow down yours, obviously. Smile

If a dev will tell that this could slow down ecompile performance, never mind.

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Tue Dec 05, 2006 12:28 pm    Post subject: Reply with quote

Developer Silver wrote:
Try to put an useless include in a .src file: the generated .dep file will list that file anyway.
This means: ecompile already looks for every included file, so it could be easy and fast to track which .inc are really used (while it parses .src file) and which ones are not.


This is quite the non sequitur. Of course eCompile looks for every included file. It would be fairly useless if it did not. Actually, this fact shows exactly what you are missing: eCompile lists the file anyway because it doesn't know (or care) if you've used anything in it, or not, because by design, it simply ignores code that you never call.


Developer Silver wrote:
We're asking a feature to improve our compiling optimization


You are asking for a feature to do your job as scripter for you... you are asking for the compiler to do more work than it needs to, because you don't want to do the work yourself. In the time you've taken posting about this, you could have fixed the problem. Also, the time you've spent posting about this is probably more than the extra time it takes your eCompile to run due to an extra include here or there, unless you have a REALLY slow system, or basically have all includes included in every single source file.

Developer Silver wrote:
If a dev will tell that this could slow down ecompile performance, never mind.


I figure the devs will do or not do the feature based on whatever criteria they have. One criteria might be: Is it worth taking time to develop this feature, when it's something that the scripter could and should themselves do?

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Tue Dec 05, 2006 12:30 pm    Post subject: Reply with quote

Developer Silver wrote:
Try to put an useless include in a .src file: the generated .dep file will list that file anyway.
This means: ecompile already looks for every included file, so it could be easy and fast to track which .inc are really used (while it parses .src file) and which ones are not.


This is quite the non sequitur. Of course eCompile looks for every included file. It would be fairly useless if it did not. Actually, this fact shows exactly what you are missing: eCompile lists the file anyway because it doesn't know (or care) if you've used anything in it, or not, because by design, it simply ignores code that you never call.


Developer Silver wrote:
We're asking a feature to improve our compiling optimization


You are asking for a feature to do your job as scripter for you... you are asking for the compiler to do more work than it needs to, because you don't want to do the work yourself. In the time you've taken posting about this, you could have fixed the problem. Also, the time you've spent posting about this is probably more than the extra time it takes your eCompile to run due to an extra include here or there, unless you have a REALLY slow system, or basically have all includes included in every single source file.

Developer Silver wrote:
If a dev will tell that this could slow down ecompile performance, never mind.


I figure the devs will do or not do the feature based on whatever criteria they have. One criteria might be: Is it worth taking time to develop this feature, when it's something that the scripter could and should themselves do?

Author Message
Marilla



Joined: 02 Feb 2006
Posts: 329

PostPosted: Tue Dec 05, 2006 12:32 pm    Post subject: Reply with quote

Developer Silver wrote:
Try to put an useless include in a .src file: the generated .dep file will list that file anyway.
This means: ecompile already looks for every included file, so it could be easy and fast to track which .inc are really used (while it parses .src file) and which ones are not.


This is quite the non sequitur. Of course eCompile looks for every included file. It would be fairly useless if it did not. Actually this fact shows what I think you are missing: eCompile lists the file anyway because it doesn't know (or care) if you've used anything in it or not, because by design it simply ignores code that you never call.


Developer Silver wrote:
We're asking a feature to improve our compiling optimization


You are asking for a feature to do your job as scripter for you... you are asking for the compiler to do more work than it needs to, because you don't want to do the work yourself. In the time you've taken posting about this, you could have fixed the problem. Also, the time you've spent posting about this is probably more than the extra time it takes your eCompile to run due to an extra include here or there, unless you have a REALLY slow system, or basically have all includes included in every single source file.

Developer Silver wrote:
If a dev will tell that this could slow down ecompile performance, never mind.


I figure the devs will do or not do the feature based on whatever criteria they have. One criterion might be: Is it worth taking time to develop this feature, when it's something that the scripter could and should themselves do?


Last edited by Marilla on Tue Dec 05, 2006 5:36 pm; edited 1 time in total

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Tue Dec 05, 2006 4:47 pm    Post subject: Reply with quote

This looks like a function better suited to some other scripting language. Maybe Perl or some text parsing language like Perl. If I understand Perl's capabilities a script could be written to parse all src files and check for includes not referenced by those files or their includes.

Author Message
Xadhoom



Joined: 26 May 2006
Posts: 30

PostPosted: Wed Dec 06, 2006 3:39 am    Post subject: Reply with quote

Marilla wrote:
One criterion might be: Is it worth taking time to develop this feature, when it's something that the scripter could and should themselves do?

Another can be: would this feature be useful to people who don't know all their includes by heart? like people who downloads the distro and want to modify something in the include organization? Confused
But as i've already said: it's up to the dev, no need to continue this (useless) discussion, so don't expect me to reply again Razz

Post new topic   This topic is locked: you cannot edit posts or make replies.    PenUltima Online Forum Index -> Feature Suggestions All times are GMT - 4 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty