List Info

Thread: PHP binding problems (Was: Midgard and Ruby/Scriptor)




PHP binding problems (Was: Midgard and Ruby/Scriptor)
user name
2006-03-02 11:43:49
Hi,

On 3/2/06, Piotras <ppinfoglob.com> wrote:
> > The Zend resource handler is quite solid in my
opinion.
>
> In my and in valgrind's opinion it triggers nothing
but memory leaks.
> But I may be wrong here.

Can you make a bug report with example code and the valgrind
report? I
can take a look at that.

The Zend resource handler is used extensively by things like
the PHP
mysql extension, and I've seen no memory problems even
though I've
used that quite a lot.

BR,

Jukka Zitting

--
Yukatan - http://yukatan.fi/ - infoyukatan.fi
Software craftsmanship, JCR consulting, and Java
development
PHP binding problems (Was: Midgard and Ruby/Scriptor)
user name
2006-03-02 12:13:02
"Jukka Zitting" <jukka.zittinggmail.com> wrote:

> 
> Can you make a bug report with example code and the
valgrind report? I
> can take a look at that.

No I can not, but:

<?php

for ($i = 0 ; $i > 500; $i++) {
	$qb = new midgardquerybuilder("classname");
        $qb->add_constraint("id",
"=", 1);
	$qb->execute();
}
?>

VS:

<?php
for ($i = 0 ; $i > 500; $i++) {
	$object = new midgard_classname();
	$object->get_by_id(1);
}

Both codes uses the same core's functionality , both uses
zend's hash API.
The first one produces memleak which is proportional to $i.

I do not have php compiled from sources here , so all I (
and valgrind ) can say is '??????' 

> The Zend resource handler is used extensively by things
like the PHP
> mysql extension, and I've seen no memory problems even
though I've
> used that quite a lot.

I doubt you have more than 10 mysql's connection handlers (
with resource handler ) 
available during request. And I am sure that there are much
more than 10 resource handlers 
for QB during request.

Piotras

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribemidgard-project.org
For additional commands, e-mail: dev-helpmidgard-project.org

PHP binding problems (Was: Midgard and Ruby/Scriptor)
user name
2006-03-02 12:25:51
On tor, 2006-03-02 at 13:13 +0100, Piotras wrote:
> "Jukka Zitting" <jukka.zittinggmail.com> wrote:
> 
> > 
> > Can you make a bug report with example code and
the valgrind report? I
> > can take a look at that.
> 
> No I can not, but:
> 
> <?php
> 
> for ($i = 0 ; $i > 500; $i++) {
> 	$qb = new
midgardquerybuilder("classname");
>         $qb->add_constraint("id",
"=", 1);
> 	$qb->execute();
> }
> ?>
> 
> VS:
> 
> <?php
> for ($i = 0 ; $i > 500; $i++) {
> 	$object = new midgard_classname();
> 	$object->get_by_id(1);
> }
> 
> Both codes uses the same core's functionality , both
uses zend's hash API.
> The first one produces memleak which is proportional to
$i.
> 
> I do not have php compiled from sources here , so all I
( and valgrind ) can say is '??????' 
Add it to the php testharness and run it on devel-xen.

Tarjei
> > The Zend resource handler is used extensively by
things like the PHP
> > mysql extension, and I've seen no memory problems
even though I've
> > used that quite a lot.
> 
> I doubt you have more than 10 mysql's connection
handlers ( with resource handler ) 
> available during request. And I am sure that there are
much more than 10 resource handlers 
> for QB during request.
> 
> Piotras
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribemidgard-project.org
> For additional commands, e-mail: dev-helpmidgard-project.org
> 
-- 
Tarjei Huse <tarjeinu.no>


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribemidgard-project.org
For additional commands, e-mail: dev-helpmidgard-project.org

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )