So as I am architecting my project, I'm thinking I must be doing something wrong. Some pieces of template code are reusable that makes me want to extract the code out of the template, but I can't find a good way. For example, some buttons are the same design all throughout the website. What's the best way to extract it out of the page? This is where I considered the use of simple, inclusion tags, or include files.
Now this is fine, except I'm also very concerned with optimizing for speed. After doing tests, I've found that using simple tags is 50% slower than just normal inline templating and inclusion tags are more than 350% slower. This is a concern because some pieces of code that are duplicated are in places that are for looped down the list. So for instance, when showing a list of items, I have a piece of code for up/down voting that is duplicated across the site. If I use something like inclusion tag, that would add a lot of heavy lifting for the site. Is there a better way to do all of this?
If I'm building for speed, should I essentially compromise DRY to make things faster?