Skip to content

Test performance of multisite#485

Draft
zmsdev wants to merge 9 commits into
mainfrom
fb_test_perf_multisite
Draft

Test performance of multisite#485
zmsdev wants to merge 9 commits into
mainfrom
fb_test_perf_multisite

Conversation

@zmsdev

@zmsdev zmsdev commented May 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@zmsdev
zmsdev marked this pull request as draft May 6, 2026 10:04
@zmsdev
zmsdev requested a review from drfho May 6, 2026 10:04
@zmsdev
zmsdev force-pushed the fb_test_perf_multisite branch from 475fa40 to 4c5edfc Compare June 12, 2026 09:13
@drfho

drfho commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

@zmsdev : zms.init creates type error in standard.sort_list() and ZMI of sub-clients ends in

  File "/home/zope/src/zms-publishing/ZMS5/Products/zms/_confmanager.py", line 1277, in getMetaobjIds
    return self.getMetaobjManager().getMetaobjIds( sort, excl_ids)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/home/zope/src/zms-publishing/ZMS5/Products/zms/ZMSMetaobjManager.py", line 625, in getMetaobjIds
    ids = sorted(ids,key=lambda x:obs[x].get('name',x))
  File "/home/zope/src/zms-publishing/ZMS5/Products/zms/ZMSMetaobjManager.py", line 625, in <lambda>
    ids = sorted(ids,key=lambda x:obs[x].get('name',x))
                                  ~~~^^^
KeyError: 'com.zms.foundation.theming'

this does not happen with main-branch

Left: main-branch, Right: fb_test_perf_multisite-branch
image

quickfix : sort_list

security.declarePublic('sort_list')
def sort_list(l, qorder=None, qorderdir='asc', ignorecase=1):
  """
  Sorts list by given field.
  @return: Sorted list.
  @rtype: C{list}
  """
  tl = [(x, x) for x in l]
  if qorder is not None:
    if isinstance(qorder, str):
      tl = [(sort_item(x.get(qorder, None)), x) for x in l]
    elif isinstance(qorder, list):
      tl = [([sort_item(x[y]) for y in qorder], x) for x in l]
    else:
      tl = [(sort_item(x[qorder]), x) for x in l]
  if ignorecase and len(tl) > 0 and isinstance(tl[0][0], str):
    tl = [(str(x[0]).upper(), x[1]) for x in tl]
  try:
    tl = sorted(tl,key=lambda x:x[0])
  except Exception as e:
    pass
  tl = [x[1] for x in tl]
  if qorderdir == 'desc':
    tl.reverse()
  return tl
image

COMPARE PR TO MAIN: main...fb_test_perf_multisite

drfho pushed a commit that referenced this pull request Jun 19, 2026
improved performance of calling default-properties, Ref: #485
@zmsdev
zmsdev force-pushed the fb_test_perf_multisite branch from 0c403b2 to b731976 Compare June 19, 2026 13:57
@zmsdev
zmsdev force-pushed the fb_test_perf_multisite branch from fabdb2b to 17976dc Compare June 19, 2026 14:10
@zmsdev

zmsdev commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

fixed error in manage_main:
17e352a

@drfho

drfho commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

@zmsdev
Measuring the new branch https://github.com/zms-publishing/ZMS/tree/fb_ram_cache shows a speed-up at level-2 but then still an increase of the render-time. I would expected a flat-curve if the availability of the model-config is the only reason for slowing down render-time.

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants