3 ms·
You don't need to parse the grammar for every request and as they admitted it was an old implementation. What I understand they have a new one now. You can par
by tored 5y ago
You don't need to parse the grammar for every request and as they admitted it was an old implementation. What I understand they have a new one now.
You can parse grammar on save and make an optimized compiled format where static content is already resolved. Next step is to substitute semi-static content (like author name) to a runtime format, this last format can handle dynamic data substitution like current date & time, but probably going to be rare that any substitution is needed for the runtime format (how much truly dynamic data does a wiki have?), most of the time just print it with readfile or similar. Only difficult part here is cache invalidation for the runtime format (I know, it is one of the three difficult things you can do in programming).
3000 request/second in PHP is not hard, especially if you plan for it.
- jiggawatts 5y agoIt's not at all hard! A typical Wikipedia page has the "chrome", which changes based on your logon, and then content, which generally does not. Cache invalidation is trivial, because there's only one atomic "blob" to track instead of the output of some complex query. This is why it amuses me that people seem to think that Wikipedia "requires" tens of millions of dollars of infrastructure to host. It doesn't require it. It's just that some things are better/easier with more kit, such as maintenance.