11
phppp
Re: smarty plugins generate much overhead!
  • 2005/7/21 23:43

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Quote:

birdseed wrote:

I did a newbb hack for xoops1 where all that is done to display a (precalculated) newbb posting is fetching a MySQL text field and putting it out with echo. with the xoops2 update, i have to do this again because noone cared about such things.


Very interesting.
I am seeking alternatives for NewBB rendering solutions.
Is your hack available for download?
Or would you plz share your ideas?

12
skalpa
Re: smarty plugins generate much overhead!
  • 2005/7/22 0:18

  • skalpa

  • Quite a regular

  • Posts: 300

  • Since: 2003/4/16


Quote:
If there is a smarty compiler plugin integration, why the hell did the smarty developers not use it??? Is there any reason for not using compilation for a one-line-code?


Better ask the Smarty devs about this one. IMHO the original idea behind Smarty (making a compiler/code generator) got lost progressively with the arrival of new devs to the project, who changed it more into a traditionnal template engine.

Quote:
So I wonder if the road(map) that you decided to go is the right one


And I wonder if you'd better not take your time when reading documents, whether it's a manual or roadmap you seem to miss the point each time.
What are you talking about ? Where did you read about abstraction ? The document talks about modularity, simplicity and layering, not abstraction. If you had read correctly, you'd have seen we're not taking the direction that leads to an absctraction layer, but more to an application development / generation platform, one of our goals being actually to ensure genericity and abstraction does not lead to overhead in the runtime code.
So forgive me, but you're a bit off-topic pal...

skalpa.>
Any intelligent fool can make things bigger, and more complex. It takes a touch of genius, a lot of courage, to move in the opposite direction.
Two things are infinite: the universe and human stupidity; and I'm not sure about the 1st one (A.Einstein)

13
McNaz
Re: smarty plugins generate much overhead!
  • 2005/7/22 8:40

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Quote:
If my site was bigger, I wouldn´t use xoops, i wouldn´t use php. Instead, I would use a compiled language like java or .NET, i would not be using MySQL but MSSQL Server, Ingres or even oracle.


I not trying to be picky here but the above statement is incorrect.

PHP is no different from Java or .NET (new name for M$ Visual Basic). They are ALL interpreted languages. Of the three PHP is probably the fastest but Java and .Net have the larger financial backing (and spin about speed).

A compiled language is C, C++, Pascal, Modula-2 etc. These ARE faster but more difficult to code especially for a web serving environment.

Moving onto databases...

MSSQL is definitely the fastest, by faaaaaar, from Ingress and even Oracle. Nothing, atm, touches MSSQL for speed. This is largely due to the fact that MSSQL does not support transaction control in it's native form. Enabling transaction control makes MSSQL more robust but slower.

Would I run a CMS/Website on MSSQL. Hell Yeah! Would I run my company's accounting system in MSSQL. Hell No!

In future, please get your facts right.

PS. Sorry for being picky but that statement about .Net being faster than PHP really kicked me off!!

PSS. Another thing about .Net. I would love to see you run that on a Linux host. Coming from M$ based COM and ISAPI web background (...shudders..) I can assure you now that remotely maintaining a site is much more time consuming and frustrating. Get ready to get reeeeaaaal friendly with your web provider because you will be asking him to be rebooting his webserver very often.... unless you have your own dedicated server which is pretty much the only way you can run such a setup

14
birdseed
Re: smarty plugins generate much overhead!
  • 2005/7/22 11:13

  • birdseed

  • Just popping in

  • Posts: 59

  • Since: 2005/2/26


Hi

@mcnaz
Okay, let´s discuss it ;)
I think we both know the difference between compiled and interpreted language, about MSIL and Bytecode, JIT and stuff. So let´s not get stuck in that discussion.
In php, you don´t have a compiler who says: in line 123, there is a datatype conversion error. in line 456, the called function is not declared. we both know.

I have written a module named webmusic, which uses a class named Category. Now it is named WebmusicCategory, because yesterday *bang* a naming conflict with a class Category in CBB occured. Such things happen if there is no compiler (okay, you could solve it with namespaces, but I nevertheless, I hope you see the point -> runtime errors instead of compile-time errors)

okay so if homerecording.de gets the double size:
When I speak of mssql, i don´t focus on speed, i mean foreign key constraints, stored procedures, triggers, transactions. Everything to guarantee data integrity in a complex environment. my page ain´t that complex that i would need such things. and MySQL is okay ans stable, with 4.1 we will be able to change for example uids in a simple way with the help of foreign key constraints, this is a big step ahead for us because we need that for merging to platforms together. okay, but it i had a even bigger and more complex site, i should have the money to host a webgarden or webfarm . as this is not the fact at the moment, I hope to gain some performance in the core hacks I´m planning now.

But generally, I see some boundaries in the complexity of php(mysql applications. I see the typical XOOPS problem, that with every hack, there is a new problem anywhere else.

So I am afraid, that someday, we have a xoosphere that is so complex that you need weeks to find a simple bug, because in line 1234, the serializer made a wrong unicode conversion. So a week later, a user complains about a smilie not showing correctly.

And I am afraid that it will make XOOPS slower. We will have more queries, we will have a load of class includes which need to be parsed. As in php, with every request objects need to be newly created (or did I miss a new application cache in php5?), this could be time-consuming. You could use serialisation to make this faster, but this could lead to new problems, or you need more code to validate the deserialisation process.

I hope I am just a stupid sceptic who hasn´t understood the concept. But at the moment, i am a bit pessimistic about xoosphere.

@phpbbb

I have sent you the class.forumpost.php. It is rather a dirty hack which writes the sanitized text to an extra column in the newbb_posts_text table. so at every display, XOOPS doesn´t have to do the sanitizing process again.

greetings
birdseedmusic

Login

Who's Online

102 user(s) are online (69 user(s) are browsing Support Forums)


Members: 0


Guests: 102


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits