Forums / Suggestions / Make versioning / drafts optional per class

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}

eZ debug

Timing: Jan 18 2025 04:16:51
Script start
Timing: Jan 18 2025 04:16:51
Module start 'content'
Timing: Jan 18 2025 04:16:52
Module end 'content'
Timing: Jan 18 2025 04:16:52
Script end

Main resources:

Total runtime0.6170 sec
Peak memory usage4,096.0000 KB
Database Queries196

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 588.9609180.8125
Module start 'content' 0.00740.4965 769.7734573.1719
Module end 'content' 0.50380.1131 1,342.9453334.5469
Script end 0.6169  1,677.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.6414210.0002
Check MTime0.00150.2362210.0001
Mysql Total
Database connection0.00080.135810.0008
Mysqli_queries0.553489.70331960.0028
Looping result0.00170.27461940.0000
Template Total0.587395.220.2937
Template load0.00240.389220.0012
Template processing0.584994.807620.2925
Template load and register function0.00010.015710.0001
states
state_id_array0.00090.150710.0009
state_identifier_array0.00060.102420.0003
Override
Cache load0.00200.3232280.0001
Sytem overhead
Fetch class attribute can translate value0.00100.158040.0002
Fetch class attribute name0.00170.278040.0004
XML
Image XML parsing0.00090.142640.0002
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00190.3138280.0001
String conversion0.00000.001030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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