ExportXMLWordPrintable

    • Type: Incident report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 8.0.0beta2
    • Component/s: Frontend (F)
    • None
    • Support backlog
    • 1

      We confirmed this issue with Zabbix 8.0.0beta2.
      When you import a template with a lot of branches in Value Maps into Zabbix Server, the time it takes to open that template gets really long as the number of Value Maps increases.
      This issue doesn't happen in 7.0 or 7.2/7.4.

      Steps to reproduce:

      1. Import a template that has a lot of Value Maps
      2. Open the edit screen for that template.

      Result:
      For a template with 250 Value Maps, the time it takes to open it is as follows:

      • 8.0 beta2... 56,000 msec
      • 7.4 ... 72 msec
      • 7.0 ... 72 msec

      After modifying class.form.js as shown in the attachment, the issue was resolved.
      Just to be safe, I’m also attaching the original file as class.form.js_org.

      # diff -up class.form.js_org class.form.js
      --- class.form.js_org	2026-07-09 13:34:25.000000000 +0900
      +++ class.form.js	2026-08-07 09:21:47.419150200 +0900
      @@ -164,8 +164,11 @@ class CForm {
       		const all_fields = elem.querySelectorAll("[data-field-type]");
       		const sub_fields = elem.querySelectorAll(":scope [data-field-type] [data-field-type]");
      
      -		// This is difference between arrays.
      -		return Object.values(all_fields).filter(x => !Object.values(sub_fields).includes(x));
      +	const sub_fields_set = new Set(sub_fields);
      +
      +	return [...all_fields].filter(field =>
      +		!sub_fields_set.has(field)
      +		);
       	}
      
       	getAllValues() {
      

        1. zbx_export_templates-without-item.yaml
          276 kB
          Hiroyuki Suzuki
        2. class.form.js_org
          16 kB
          Hiroyuki Suzuki
        3. class.form.js
          16 kB
          Hiroyuki Suzuki

            Assignee:
            Zabbix Development Team
            Reporter:
            Hiroyuki Suzuki
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: