[Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.

2006-09-05 Thread Max M

Max M wrote:


I am not sure what is causing the problems. I am mostly a developer of
end user tools. Not a core Zope/Plone developer. And I am not really
interested in becoming one either. There must be a niche for developers 
like me that focus on end users.



Well ok. I have researched a bit more. All the speedup suggestions gave 
at maximum 5-10 seconds. Not nearly enough. (Didn't try to buy a new 
computer though. Will do that next week ;-)


I also tried to run Zope as a zeo client from a usb flash disk.

As expected the initial compilation to byte code was slw. I then 
expected it to run fast after that. It didn't!

*clever* configuration clearly wasn't clever enough for me.


So I made a site with a standard Zope tool:

class simple_tool(UniqueObject, PropertyManager,
   SimpleItem.SimpleItem, ActionProviderBase):


And I added a simple Plone skin.

Now refresh worked like a charm. Both when changing the code in the tool 
and the page templates in the skin.


So the problem only exists for me in Archetype based products. Anytime I 
do a change in any AT content type I need to restart the site.


Can anybody confirm this behavior?


--

hilsen/regards Max M, Denmark

http://www.mxm.dk/
IT's Mad Science

Phone:  +45 66 11 84 94
Mobile: +45 29 93 42 96

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

http://mail.zope.org/mailman/listinfo/zope )


I'm starting to get bored of people complaining about Zope (was: Re: [Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.)

2006-09-05 Thread Sidnei da Silva
On Tue, Sep 05, 2006 at 03:39:14PM +0200, Max M wrote:
| So the problem only exists for me in Archetype based products. Anytime I 
| do a change in any AT content type I need to restart the site.
| 
| Can anybody confirm this behavior?

That's a known-(at least to me)-issue. 

   When you refresh an Archetypes-based product you need to refresh
   Archetypes as well. You can do this by marking the product as
   dependent on Archetypes and then refresh Archetypes (which will
   refresh it's dependencies, refreshing your product).

If you don't know what I'm talking about go research more about the
refresh functionality in Zope 2.

-- 
Sidnei da Silva
Enfold Systemshttp://enfoldsystems.com
Fax +1 832 201 8856 Office +1 713 942 2377 Ext 214
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.

2006-09-05 Thread Lennart Regebro

One problem with fixing the refresh is that the more you fix, the
longer the refresh will take. To fix Five to be stable in refresh, we
may very well have to kill all things registered by ZCML, and
re-register all of it. It's highly unlikely that we get a real stable
refresh by just refreshing one products ZCML. What happens if there
are overrides, and so on.

So, in the end, you end up with refreshing everything, which would
take just as long as stopping and starting the ZEO client.

We can probably make it possible to make the refresh somewhat more
stable and support a wider range of cases. But you still have to make
very careful configuration of the refresh in most of this cases, and
if you don't do it just right, it won't work.

So I'm not sure it's worth the effort.

Doing tests is a good idea especially if you take a bit of care. The
calendar products I'm working on have that care taken automatically,
as it's split into three products, one pure python, one Zope layer
with the persistance and UI and one CPS integration. Most tests are on
the python product, or the Zope product. The python tests take 0.8
seconds to run, the Zope tests 4 seconds.

With CPS it gets worse, because the tests need to create a CPS site.
It's the same with Plone. In those cases tests will not be faster than
refreshing. Running all of them takes a bit less than a minute I
think, and running just one isn't that much faster. But the amount of
tests needed there is very low, as most is done on the CalCore and
CalZope layer.

This way development is pretty fast, and doesn't need much refreshing.
Then comes a part where you need to get it to actually work, and not
just pass the tests. Here you need to refresh a bit. And then most of
the work is UI-fixing, which doesn't need refresh again, because it's
mostly HTML.

I find this mode of development faster than when I had working
refresh, beause the existance of the tests stop me from shooting my
foot. ;)
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope )


Re: I'm starting to get bored of people complaining about Zope (was: Re: [Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.)

2006-09-05 Thread Dieter Maurer
Sidnei da Silva wrote at 2006-9-5 10:46 -0300:
 ...
That's a known-(at least to me)-issue. 

   When you refresh an Archetypes-based product you need to refresh
   Archetypes as well. You can do this by marking the product as
   dependent on Archetypes and then refresh Archetypes (which will
   refresh it's dependencies, refreshing your product).

If you don't know what I'm talking about go research more about the
refresh functionality in Zope 2.

We are refreshing AT contents types without a need to refresh AT
itself (in Zope 2.8.1, AT 1.3.x).



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


[Zope-dev] Re: I am starting to hate Zope/Plone development and its bl**dy lack of refresh.

2006-09-04 Thread Rocky Burt
On Mon, 2006-04-09 at 12:55 +0200, Max M wrote:
 Does anybody have a clue as to where the problem is? And why aren't 
 there any more people complaining about it? Is it because I develop on 
 Windows and am the only one doing so?
 
 
 What do I have to do to get the sweet sweet refresh working again?

This isn't really a Plone issue, but since it affects so many Plone
developers I'll give my 2 cents.

I will begin by saying refresh has never been totally reliable for me...
even in Zope 2.7.  Often times I would refresh and get frustrated by the
fact that my code wasn't reloaded and end up restarting anyhow.

But the true killer right now is the Zope 3 CA.  Basically, if you use
zope 3 components, they cannot be refreshed currently.  Plone 2.5 uses a
ton of Zope 3 views.  Now this doesn't excuse why the code *you* write
(if it's not using Zope 3 CA) isn't able to be refreshed.  For that, I
have no answer.

So, I've learned to change my habits.  I'm sure you've heard this a
million times, but there's good reason... it just works.  And that is to
write unit tests to build your functionality rather than loading it up
in Zope.  This cuts down on restart times *bigtime*.  This is not
specific to core plone developers.  Everyone who writes python code
should be writing unit tests.  My first test of the quality of a
third-party plone product is to inspect it's test coverage.

Anyhow, hope that helps.

Regards,
Rocky


-- 
Rocky Burt
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net



signature.asc
Description: This is a digitally signed message part
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )