Make versioning / drafts optional per class

Author Message

Karsten Jennissen

Monday 23 June 2003 7:25:01 am

Picking up a very good suggestion from Paul K Egell-Johnsen and Selmah Maxim from this thread:
http://ez.no/developer/ez_publish_3/forum/developer/this_is_not_logic_specification_in_ezp3_
I'd like to second that and suggest a simple switch in the class definition to turn on / off versioning, storing of drafts and maybe even translations.

This is basically an optimization switch to take load off the database. E.g. in many instances versioning is not needed for users and drafts are in my view not necessary in any case for users. There surely are other types of classes where this applies as well.

I would probably make sense to provide this switch not only for classes but also for objects / nodes?!

Karsten

Bård Farstad

Monday 23 June 2003 7:45:26 am

It's really not that simple to disable versioning and drafts. As it works today you need to have drafts and at least two versions ( for re-publishing ). But you can clean up versions after publishsing. We should add a feature for setting the number of versions to keep in the history. ( e.g. 5 versions for article 2 for forum etc.. ).

We should add more features to the versioning system so you would be able to purge old versions ( "flatten versions" ) on a pr object basis.

That beeing said. There are quite some optimizations we can do. E.g. with translations, there is an overhead in joining with the translation table.

--bård

Documentation: http://ez.no/doc

Karsten Düsterloh

Friday 15 October 2004 5:54:30 am

We found this kind of hack (for 3.4.2) to turn of the draft versioning mechanism:
just override the content/edit_draft.tpl with this:

{let
last_draft=$object.versions|extract_right(1)[0]
content_attributes=$last_draft.contentobject_attributes
main_node_id=$last_draft.main_parent_node_id
edit_version=$last_draft.version
edit_language=$last_draft.translation.language_code
attribute_base='ContentObjectAttribute'
}

{include uri="design:content/edit.tpl"}

{/let}

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:38:42
Script start
Timing: Jan 18 2025 10:38:42
Module start 'layout'
Timing: Jan 18 2025 10:38:42
Module start 'content'
Timing: Jan 18 2025 10:38:42
Module end 'content'
Timing: Jan 18 2025 10:38:42
Script end

Main resources:

Total runtime0.4089 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.0469152.6406
Module start 'layout' 0.00500.0026 740.687539.4766
Module start 'content' 0.00760.3997 780.1641568.0781
Module end 'content' 0.40730.0015 1,348.242212.1250
Script end 0.4088  1,360.3672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.7589160.0002
Check MTime0.00130.3158160.0001
Mysql Total
Database connection0.00070.164610.0007
Mysqli_queries0.358687.7049590.0061
Looping result0.00060.1391570.0000
Template Total0.383493.820.1917
Template load0.00170.407020.0008
Template processing0.381893.370820.1909
Template load and register function0.00010.029810.0001
states
state_id_array0.00090.225710.0009
state_identifier_array0.00100.256620.0005
Override
Cache load0.00140.3409280.0000
Sytem overhead
Fetch class attribute can translate value0.00070.171230.0002
Fetch class attribute name0.00200.483340.0005
XML
Image XML parsing0.00090.212330.0003
class_abstraction
Instantiating content class attribute0.00000.002740.0000
General
dbfile0.00070.1730170.0000
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs