Mailing List Archive

Monkey patch for BLOB support in OFS.Image Images and Files
I have a monkey patch here that I would like comments on it and to see how it
works for others.

https://github.com/Immudzen/MonkeyOFSImageFile

I have been testing it for a few weeks now and I have not run into any
problems with it. It works on Zope 2.13 and it should work on Zope 2.12 also
without any issues.

All that is needed it is to put this in your Products dir and make sure you
have BLOB support setup correctly.

Once that is done all uses of the Image and File objects inside zope will save
as BLOBs instead and existing objects can be converted to BLOB objects with a
script I have in the README file.

What I have found so far is that with this zope has a lower memory usage and
also runs faster. So far in my testing it is about 33% lower memory usage and
I am interested in how others find it.

You can also find me in #zope as kosh if you have questions about it.
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Monkey patch for BLOB support in OFS.Image Images and Files [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 1/7/11 22:28 , William Heymann wrote:
> I have a monkey patch here that I would like comments on it and to see how it
> works for others.

Hi William,

A huge monkey patch like that makes it very hard to compare it with the
original implementation and see the actual changes. You could help the
review *greatly* by providing a diff to the original implementation
instead, and post that to the Zope bug tracker on Launchpad:

https://bugs.launchpad.net/zope2

jens

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAk0oQ1kACgkQRAx5nvEhZLJk5gCgtnVBC7XF6PbOlOf1NPr6Ge70
gZoAn3VM6J8ecvLvXZzlFP55LQ4/Szr6
=Bfle
-----END PGP SIGNATURE-----
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Monkey patch for BLOB support in OFS.Image Images and Files [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/08/2011 05:58 AM, Jens Vagelpohl wrote:
> On 1/7/11 22:28 , William Heymann wrote:
>> I have a monkey patch here that I would like comments on it and to see how it
>> works for others.
>
> Hi William,
>
> A huge monkey patch like that makes it very hard to compare it with the
> original implementation and see the actual changes. You could help the
> review *greatly* by providing a diff to the original implementation
> instead, and post that to the Zope bug tracker on Launchpad:
>
> https://bugs.launchpad.net/zope2

The developer docs help explain how to create such a patch as a
non-committer: in particular:

http://docs.zope.org/developer/noncommitter-svn.html

shows how to use SVN to generate the patch without needing write access.


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0omvYACgkQ+gerLs4ltQ5aLACeJTsnaKuyRAi6uEnFePwBR+eP
YzgAn1P7M20BpM2/H5JncUFv7QLhCgSZ
=Xfvp
-----END PGP SIGNATURE-----

_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Monkey patch for BLOB support in OFS.Image Images and Files [ In reply to ]
On Saturday 08 January 2011, Tres Seaver wrote:
> On 01/08/2011 05:58 AM, Jens Vagelpohl wrote:
> > On 1/7/11 22:28 , William Heymann wrote:
> >> I have a monkey patch here that I would like comments on it and to see
> >> how it works for others.
> >
> > Hi William,
> >
> > A huge monkey patch like that makes it very hard to compare it with the
> > original implementation and see the actual changes. You could help the
> > review *greatly* by providing a diff to the original implementation
> > instead, and post that to the Zope bug tracker on Launchpad:
> >
> > https://bugs.launchpad.net/zope2
>
> The developer docs help explain how to create such a patch as a
> non-committer: in particular:
>
> http://docs.zope.org/developer/noncommitter-svn.html
>
> shows how to use SVN to generate the patch without needing write access.
>
>
> Tres.

I wasn't sure what I should call the bug or even what severity to give it so
for now I have put the patch at.

https://github.com/Immudzen/MonkeyOFSImageFile/blob/master/blobpatch

It is a diff to zope 2.13 checkout from svn and the diff was generated
according to the link provided.

This monkey patch is probably not suitable to be directly merged into zope
though because I removed a lot of the pdata support. It can still serve pdata
structures just not write them anymore since that did not seem important
anymore but would need to be for a real patch to zope itself.

For my own usage I just needed to convert everything to blobs since that
provided some very nice gains. If this is useful to others though I am willing
to put in the work to make it a real patch to zope that would preserve the
pdata stuff if needed.
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )