Minified Code

瀏覽次數:198 次
跳到第一則未讀訊息

Matthew Hazlett

未讀,
2012年4月27日 凌晨12:22:142012/4/27
收件者:nod...@googlegroups.com
Has anyone experimented with minifing code with node?

I know the reason to minify on the client side is its faster load time
to the browser, was just wondering if there were any performance gains
with minimized code on the server side or perhaps a bottleneck with the
eval() of the code.

Mark Hahn

未讀,
2012年4月27日 凌晨12:48:112012/4/27
收件者:nod...@googlegroups.com
I have always assumed minifying only served the single purpose of speeding up the transfer over the net.  I seriously doubt compile time is improved noticeably.  C++ rips through source quickly.

On Thu, Apr 26, 2012 at 9:22 PM, Matthew Hazlett <haz...@gmail.com> wrote:
Has anyone experimented with minifing code with node?

I know the reason to minify on the client side is its faster load time to the browser, was just wondering if there were any performance gains with minimized code on the server side or perhaps a bottleneck with the eval() of the code.


--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Scott González

未讀,
2012年4月27日 清晨7:15:272012/4/27
收件者:nod...@googlegroups.com
For starters, you shouldn't be using a mini goer that results in an eval()...

I suppose there would be a slight performance improvement in disk I/O since there would be fewer bytes to read. But this should all be contained to startup time. It's not going to make your app perform any different.

However, something like Closure Compiler's advanced mode may actually rewrite your app to perform better.


On Friday, April 27, 2012, Matthew Hazlett wrote:
Has anyone experimented with minifing code with node?

I know the reason to minify on the client side is its faster load time to the browser, was just wondering if there were any performance gains with minimized code on the server side or perhaps a bottleneck with the eval() of the code.

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to

Axel Kittenberger

未讀,
2012年4月27日 清晨7:45:352012/4/27
收件者:nod...@googlegroups.com
> I suppose there would be a slight performance improvement in disk I/O since
> there would be fewer bytes to read. But this should all be contained to
> startup time. It's not going to make your app perform any different.

Startup time of Node or V8 is in comparison to other scripting systems
terribly slow (about 30ms on my system vs. e.g. 1ms to below
measurement of time e.g. Lua) so I doubt loading time of the code
determined by size would matter anything compared to that. Not that it
matters anyway, since node is a system that is written and optimized
to be running and not be started often.

Matt

未讀,
2012年4月27日 上午10:23:142012/4/27
收件者:nod...@googlegroups.com
On Fri, Apr 27, 2012 at 7:45 AM, Axel Kittenberger <axk...@gmail.com> wrote:
> I suppose there would be a slight performance improvement in disk I/O since
> there would be fewer bytes to read. But this should all be contained to
> startup time. It's not going to make your app perform any different.

Startup time of Node or V8 is in comparison to other scripting systems
terribly slow (about 30ms on my system vs. e.g. 1ms to below
measurement of time e.g. Lua)

That's comparing it to the fastest scripting language in the world though. How does it compare to something more reasonable like Perl/Python/Ruby? My gut feeling is it compares really well.

Matt.

Jann Horn

未讀,
2012年4月28日 清晨5:28:372012/4/28
收件者:nod...@googlegroups.com
Why eval()?

I tried this with node code - 10% startup time improvement. See https://github.com/joyent/node/issues/1538

However, as pointed out there, line numbers will be totally useless.

Azer Koçulu

未讀,
2012年4月30日 凌晨1:29:072012/4/30
收件者:nod...@googlegroups.com

you guys may be interested at onejs: http://github.com/azer/onejs

回覆所有人
回覆作者
轉寄
0 則新訊息