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

Minify


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NinjaSK
Senior Member
Join Date: Sep 2012
Old 07-05-2013 , 11:13   Minify
Reply With Quote #1

Just a thought... Minifying Javascripts, HTMLs, CSS files will decrease page loading times and make surfing more efficient both on server and user sides.

Will minifying SourceMod code have the same effect? if so, is there a script that minifies .sp?
NinjaSK is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-05-2013 , 11:17   Re: Minify
Reply With Quote #2

Quote:
Originally Posted by NinjaSK View Post
Just a thought... Minifying Javascripts, HTMLs, CSS files will decrease page loading times and make surfing more efficient both on server and user sides.

Will minifying SourceMod code have the same effect? if so, is there a script that minifies .sp?
Two things:
  1. SourcePawn code is already compiled.
  2. SourcePawn code is never sent to the client.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Rytis
Veteran Member
Join Date: Feb 2012
Location: Germany
Old 07-05-2013 , 11:33   Re: Minify
Reply With Quote #3

Quote:
Originally Posted by NinjaSK View Post
Will minifying SourceMod code have the same effect? if so, is there a script that minifies .sp?
Nope, because when it's compiled, then it's compiled and there are no spaces, comments etc.
Rytis is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 07-05-2013 , 12:11   Minify
Reply With Quote #4

The only reason why anyone would minify SourcePawn is to obfuscate code so you're technically complying with the license, but making the source basically unreadable. If you do this, you are a horrible person.
__________________
Dr. McKay is offline
NinjaSK
Senior Member
Join Date: Sep 2012
Old 07-05-2013 , 14:07   Re: Minify
Reply With Quote #5

I think you got me wrong, I am all for sharing source code.

What I meant was that the SMX will be minified thus saving space and maybe upgrade performance on server load and possibly user-end?

I think Rytis pretty much answered my question.
NinjaSK is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 07-05-2013 , 14:30   Re: Minify
Reply With Quote #6

Quote:
Originally Posted by NinjaSK View Post
I think you got me wrong, I am all for sharing source code.

What I meant was that the SMX will be minified thus saving space and maybe upgrade performance on server load and possibly user-end?

I think Rytis pretty much answered my question.
I know, I wasn't accusing you of anything.

I was just expanding on saying that minifying SourcePawn code is not going to help at all.
__________________
Dr. McKay is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 07-05-2013 , 15:26   Re: Minify
Reply With Quote #7

Quote:
Originally Posted by NinjaSK View Post
What I meant was that the SMX will be minified thus saving space and maybe upgrade performance on server load and possibly user-end?.
The compiled code bears no resemblance to the input source code, it's a small bytecode format, that is then highly compressed.

Quote:
Originally Posted by Dr. McKay View Post
The only reason why anyone would minify SourcePawn is to obfuscate code so you're technically complying with the license, but making the source basically unreadable. If you do this, you are a horrible person.
FYI, that is against the license, the code must be in the "preferred form of the work for making modifications to it".
__________________
asherkin is online now
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 07-05-2013 , 16:36   Minify
Reply With Quote #8

Quote:
Originally Posted by asherkin View Post
FYI, that is against the license, the code must be in the "preferred form of the work for making modifications to it".
Orly? Cool.
__________________
Dr. McKay is offline
NinjaSK
Senior Member
Join Date: Sep 2012
Old 07-07-2013 , 03:37   Re: Minify
Reply With Quote #9

Thank you for the answers
NinjaSK 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 04:04.


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