SitePoint Sponsor

User Tag List

Results 1 to 1 of 1
  1. #1
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    A little cookie for you Template people ;)

    Well I decided to release this publicly after much debate, but I am turning to a generous person and here is my "gift" to the community from which I have taken so much.

    My contribution is a *very* souped up mod to patTemplate which will increase your speed by at least 30ms (yes, you heard me correctly) so you can enjoy this templating system versus something like smarty maybe. This file can also replace the one found in the patXMLRenderer also, because after my benchmarking, patTemplate is where the actual bottleneck occurs (expat is so fast) so your patXMLRenderer pages should render fully with at least a 20ms to 60ms reduction in time.

    How the HECK did I do this you ask? Well quite simply I changed those sloppy ereg's to preg's and cleaned up the match regex. Also, I replaced the attribute matcher so it matches to XHTML/XML strict tag definitions. This should be a nice little proving to the non-regex advocates how powerful regex can be. I have already submitted this to Stephan Schmidt, who hasn't replied at all which tells me he is probably busy with projects. I expect patXMLRenderer and patTemplate will come out with new versions after this gets around.

    The file is still under the LGPL license, I added myself to the credits up top and cleaned up some of the code which cut-down filesize and added some organization to the code structure. As for future projects like this where I soup up PHP scripts, I may do so sometime if the opportunity presents itself. I have also submitted another file which is my attempt at porting the JSTL to PHP. It runs really fast and has an open API for adding your own tag definitions. I expect this to either make it into a new pat project or some open source project somewhere down the line.

    Thanks everyone, your cookie is attached!
    Attached Files Attached Files
    Last edited by Theiggsta; Mar 24, 2003 at 09:34.
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •