You are here: Re: while loops within while loops causing huge memory problem « PHP Programming Language « IT news, forums, messages
Re: while loops within while loops causing huge memory problem

Posted by Kimmo Laine on 10/19/06 06:38

"monomaniac21" <mcyi2mr3@googlemail.com> wrote in message
news:1161195237.493677.322990@e3g2000cwe.googlegroups.com...
> hi all
>
> i have a script that retrieves rows from a single table, rows are
> related to eachother and are retrieved by doing a series of while loops
> within while loops. bcos each row contains a text field they are fairly
> large. the net result is that when 60 or so results are reitreved the
> page size is 400kb! which takes too long to load. is there a way of
> shorterning this? freeing up the memory say, bcos what is actually
> displayed is not that much, its just the use of multiple loops (about
> 10) that does it i think


Clearly the code needs to be optimized. Depending how bad the design is, you
should start looking at the query string, maybe the database structure. Now
it just doesn't sound too smart if it takes ten nested while loops to pull
out some simple data... But without seeing the actual code it's very
difficult to say anything more specific.

--
"Ohjelmoija on organismi joka muuttaa kofeiinia koodiksi" - lpk
http://outolempi.net/ahdistus/ - Satunnaisesti pδivittyvδ nettisarjis
spam@outolempi.net | rot13(xvzzb@bhgbyrzcv.arg)

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация