Recently Browsing 0 members
No registered users viewing this page.
I have two performance related questions.
Question 1. find vs get
In my setup, I have a template called 'article,' which is a child of 'articles.' There are two ways to get all articles.
$pages->get("/articles")->children; or this:
$pages->find("template=article"); And if I wanted to further filter the articles by author , the queries would look like these:
I think "get" would be faster in such situations. What are your thoughts? Are there any best coding practices for PW performance?
Question 2: URL Routing
The article urls in my old site are in this format: http://domainname.com/article-url.
But, in PW, the urls look like this: http://domainname.com/articles/article-url.
For URL redirection, based on what I was able to find on the forums, I made the homepage accept url segments. Then I route the requests based on the url segment (which essentially is the 'name' of the article page.)
The question now is -- how big of performance hit will the site take due to this routing? Or am I needlessly thinking too much?