Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2020-11-19 13:21:51

etc
Developer
Registered: 2010-11-11
Posts: 3,989
Website

Re: Textpattern 4.8.3 Apache Bench

gaekwad wrote #326945:

I realise the A / B testing between versions is relative within the bounds of the same db and PHP setup, but are these tests using vendor-supported PHP releases, out of interest?

I’m testing on a local XAMPP, PHP 7.4 (after removing magic quotes stuff from 4.6-4.7) fwiw.

Bloke wrote #326946:

Yes, I’m not sure of the performance impact. Classes tend to be slower, BUT taghandlers is so big and has so much repetition and pollutes the global function space, that it’s a hog.

I have trued putting all comments tags in a class without calling them (e.g. article list page). The memory usage is ~200kB lower and the runtime is closer to 4.6, but still more fluctuating (in 4.7 too). Have not compared calling comments tags yet, but this looks promising.

Perhaps we should be looking at factory classes or adapters instead. … This could be a branch swinging off 4.9, where we can experiment, perhaps?

Sure, though you risk to loose me here :-)

Offline

#32 2020-11-19 13:59:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,829
Website

Re: Textpattern 4.8.3 Apache Bench

etc wrote #326947:

I have tried putting all comments tags in a class without calling them (e.g. article list page). The memory usage is ~200kB lower and the runtime is closer to 4.6, but still more fluctuating (in 4.7 too).

Promising indeed, woohoo!

Sure, though you risk to lose me here :-)

Oh don’t be under any illusion I know what I’m talking about when it comes to factories and adpaters :) I know of them and each time I read about them I think, hey they sound like a great – if convoluted and memory-intensive – way to manage stuff. But then I completely fail to see the real-world application in Txp terms and go and do something else instead. Then forget what I learned about them.

My OO-fu is rudimentary at best. For example, I’m struggling to find the best way to factor in an SMTP Adapter to our /Textpattern/Mail classes. I know how to do it and could hack it into our workflow today ready for softly-softly usage in 4.8.4. But it probably wouldn’t be the right approach, because the use of the adapter we have today is the correct way to do it.

I don’t know whether to create a second adapter and modify our existing base mail class to handle the extra requirements of external SMTP transportation, or to do it all in a parallel adapter. I’ll need to read up on best practices (again) and figure it out, which will miss the 4.8.4 boat I expect.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB