Re: [Zope] bytecode cache?

2005-06-22 Thread Dieter Maurer
Jaroslav Luke-Bš wrote at 2005-6-22 14:51 +0200:-A
>I have idea about bytecode cache in Zope, it is possible to implement?
>
>What I mean: python scripts (in ZODB), DTML documents/methods, ZPT will be 
>bytecode compiled in similar way like ordinary .py scripts into .pyc and then 
>run much faster than "noncompiled" ZODB objects. I think that it should have 
>significant speed improvement.

All of these objects are (in some way) already now "byte compiled".

But only some of them store the compilation result inside
the ZODB (ZODB based DTML objects and PythonScripts do).

Thus, on initial access, they need to be compiled.
Further access already finds the compiled code and can skip
compilation.


However, there is potential to reduce startup (!) time
by storing the compilation result.
That is the purpose of my "CompiledExecutables"

  

When you look there, you find a note "currently broken".
That is because the current version only works with our
own slightly modified (fixed :-) ) Zope. It causes
an infinite loop when used with a stock Zope.


Someone reported the problem and I think I have a fix.
I asked the reporter to try it out and report back.
But never got an answer... maybe, because my eager spam filter
did not like his mail service provider (all providers that relay
spam and do not react on my complaints are banned to send
me any more emails).

If you are interested to take over and check my fix,
let me know (it usually is better not to try to contact me
privately (--> eager spam filter) but to send Zope related messages
and questions to the mailing list).


-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] bytecode cache?

2005-06-22 Thread Brian Lloyd
> I have idea about bytecode cache in Zope, it is possible to implement?
>
> What I mean: python scripts (in ZODB), DTML documents/methods,
> ZPT will be bytecode compiled in similar way like ordinary .py scripts 
> into .pyc and then run much faster than "noncompiled" ZODB objects. I 
> think that it should have significant speed improvement.
>
> ... or I am totally out?

Python scripts already cache a bytecode representation (or at least 
they did last time I looked - its been awhile). Not sure what you 
mean by a byte-code representation of DTML or ZPT...

Brian Lloyd[EMAIL PROTECTED]
V.P. Engineering   540.361.1716 
Zope Corporation   http://www.zope.com


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


RE: [Zope] bytecode cache?

2005-06-22 Thread Pascal Peregrina
Well, as far as I know, "bytecode" is generated by the marshal module.
And marshal can only precompile simple data types and code (classes,
functions).
So objects (class instances) can not be byte compiled.
But I may be wrong...

However, I had a funny idea too... 
I have been wondering about using marshal in ZODB instead of pickle, I mean,
we only store object's states there, and as far as I have been investigating
object states are simple python types that could be handled by marshal... But I 
am pretty sure I may have missed something that makes this completely
impossible to achieve.
It's just that, even using the highest protocol in pickle, serialization and
deserialization of simple python types is much faster with marshal.

Pascal

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Jaroslav Lukeš
Sent: 22 June 2005 13:52
To: zope@zope.org
Subject: [Zope] bytecode cache?


Dear zope core developers,

I have idea about bytecode cache in Zope, it is possible to implement?

What I mean: python scripts (in ZODB), DTML documents/methods, ZPT will be 
bytecode compiled in similar way like ordinary .py scripts into .pyc and
then 
run much faster than "noncompiled" ZODB objects. I think that it should have

significant speed improvement.

... or I am totally out?

Best regards,

-- 

Jaroslav Lukesh
  -
  This e-mail could not contain any viruses because I use Linux
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )