Live data from Hacker News

I am a fast webpage

varvy.com

131–140 of 292 posts

Re: I am a fast webpage

#131

> "I am not on a shared host, I am hosted on a VPS" Hate to break it to you, but your virtual private server (VPS) is likely sharing a bare-metal server with other VPS. ;-) Also, you can look into content delivery networks (aka CDN), which will most likely deliver this page faster to clients than your VPS especially when you consider your VPS is in Dallas and CDN's have nodes located around the world.

> Hate to break it to you, but your virtual private server (VPS) is likely sharing a bare-metal server with other VPS. ;-)

Likely? Isn't that the point of a VPS?

Re: I am a fast webpage

#132
post #64

"No Javascript" Amen.

It reminds me the "no synthesizers" used in the 80's by some musicians :-)

I know right? I cannot really for the super-cool bloatware fashion craze JS frameworks to die.

Here's an idea: WebAssembly, but use existing Opcodes from the JVM.

Re: I am a fast webpage

#133

I've always wanted to play with putting /var/www into a ramdisk for PHP/html stuff. Would be much faster loading since it's all just text in the end of the day. Completely cut out the bottleneck of SSd/HDD

You'll likely have better luck configuring php-fpm and the OpCache properly, as they are going to be doing basically what you're proposing anyway, and for the OpCache it's even nicer as it avoids reparsing the code

Re: I am a fast webpage

#134

Earlier quoted context omitted.

I don't have any personal experience, but as I understand it, that depends on whether you enabled billing.

Don't you have to provide a CC to sign up for even the free tier? (That's how it was when I was trying it out a couple of years back.) It was really cute too, Google would send me a $0.00 invoice each month.

I don't remember. I've been using it since the beginning and I don't get a bill.

I don't know how up to date this page is, but here's how it used to work: https://sites.google.com/site/gdevelopercodelabs/app-engine/...

Re: I am a fast webpage

#135
post #133

I've always wanted to play with putting /var/www into a ramdisk for PHP/html stuff. Would be much faster loading since it's all just text in the end of the day. Completely cut out the bottleneck of SSd/HDD

You'll likely have better luck configuring php-fpm and the OpCache properly, as they are going to be doing basically what you're proposing anyway, and for the OpCache it's even nicer as it avoids reparsing the code

Yea I've already set those up but I don't think opcache handles random text/html/js files. Only php files.

I could be wrong.

Re: I am a fast webpage

#136

I've always wanted to play with putting /var/www into a ramdisk for PHP/html stuff. Would be much faster loading since it's all just text in the end of the day. Completely cut out the bottleneck of SSd/HDD

If you own the hardware I imagine much of your PHP/html stuff will be served from the file system cache much of the time so you probably wouldn't see much benefit...

The idea would be to do it in an ultra-minimalist setting on a VPS (something under 256MB of ram).

Re: I am a fast webpage

#137

Earlier quoted context omitted.

If you own the hardware I imagine much of your PHP/html stuff will be served from the file system cache much of the time so you probably wouldn't see much benefit...

The idea would be to do it in an ultra-minimalist setting on a VPS (something under 256MB of ram).

I don't think it would do much there either: If it fits in your left-over RAM, then it's probably in the disk cache. If it doesn't, then you can't create a RAM disk large enough.

It might help with latency for the long-tail of data that isn't used very often and thus maybe replaced in the cache by other data, but on the other hand the OS probably had a reason to replace it and forcing it to stay in RAM might slow everything down.

Re: I am a fast webpage

#139
post #72

This took almost 10 seconds to load for me...

Around the same for me, running fibre in New Zealand. Long delay before content even began loading - as mentioned in other comments, would likely have been a non-issue if a decent CDN was used.

I'm curious, how much benefit is there to having a fibre connection in NZ except for NZ websites? What's the max speed?

Re: I am a fast webpage

#140

I hate to be negative, but what really is the point of this? That a simple webpage without any content can be fast? Of course it can. Is it desirable to inline your CSS, "like a boss?" Maybe if you have one single web page. What if you have dynamic content and your users intend to browse more than one page? With externalized CSS, that is all cached. Same with images. If I'm building a web application, I certainly do…

It's also a security issue and you should set up CSP to prohibit online CSS. See a random Google search result http://dontkry.com/posts/code/disable-inline-styles.html or like I did read "The Tangled Web" Edit: that's obviously a non-issue in this particular case since everything is static. But as a best practice this needs to be considered and inline CSS doesn't make you a boss.

You are completely wrong. Inline styles on a static page is not a security issue. If you read that blog post you linked to, you would know this.

CSP will do absolutely nothing for a single static html page containing all assets it needs as inline.

Post reply on HN