Holy cow that's a big graphic.

20 seconds does sound a tad long, but might not be depending on the 
server and memory - what are the specs?

What might possibly speed it up a bit is to create multiple small 
versions first (20 one line graphics, for example) and build them all 
together at the end by loading and copying into the final large area - 
this MIGHT cut down time a bit, because all the drawing operations would 
take place against a smaller memory area.  Just a hunch though.




Conor McTernan wrote:
> I'm currently using the GD extension to generate dynamic PNG's containing
> text, that should eventually be coming from a database. 
> 
> the deal is, it seems to take a long time, which is probably my own fault,
> seeing that I'm generating so much text. I am generating an image
> containing approx 160 lines of text, and it takes about 20seconds to
> create, this unfortunatley is too long for me. 
> 
> I was wondering if this is a common time with GD or if I am doing
> something wrong. 
> 
> Coding wise, I currently read the text in from a file, then put the text
> into an array, each line being a seperate entry in the array. I then
> create a PNG image approx 490*1848(i change the image size depending on
> the amount of text). I dont do anything really strange in my image
> function, apart from performing a wordwrap on the text before i start
> displaying it, just to make the image readable. 
> 
> ideally I would like this to come in considerably quicker. that said, if
> this is going to be used, it will probably done as a cron job, so if need
> be I will have toaccept it being super slow.
> 
> any help is appreciated bros
> 
> Conor
> 
> 



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

Reply via email to