joseph wrote:
hi,
my site is www.myowndictionary.com
i use javascript to create definitions for words (from open source
dictionaries) as pop-ups and hook word-lists for vocabulary study with
that. i can now parse the html from rss feeds and match only text of interest.
i just wrote my own multibyte html parser by combining various other
code i already had on hand for the parsing of multibyte text anyhow. but, that's not the slowest part. that takes maybe 3 seconds to get the
page, 3 seconds to parse it, but it sometimes takes 5 minutes for the
next step on huge rss files.
(I know the time because they are cached)
that last step...
The slow part that's left is the dictionary searching itself.  It's the
parsing of complicated php code -- 550 lines of complex data structure
loops, function calls, looping through arrays to make sql queeries --
lots of sql queeries.... the seconds ~ 5 minute it takes it all takes so much time.
i want to ask for opinion about:
1) rewriting the php as C extension.  Would it slow my down to the below
15 second range?

Who knows? We don't know what the code does or how it works.

C will be quicker because it's already compiled. It will be harder to maintain and debug because it's compiled.

2) does mysql have server-side functions yet?

Mysql 5 has stored procedures if that's what you mean.

3) if i moved the php code off mysql to postgresql and wrote server-side
functions (which i've been trained to do), how much of a time
improvement would we be talking about?

See # 1.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to