Webdialog and htmldialog


#1

Hello everyone
I have a question, why the webdialog window is much faster when viewing than htmldialog? thank you


#2

you need to provide some example code, as it isn’t normally the case…

CEF using html5 in a HtmlDialog will outperform IE and Safari [sometimes] that are used in WebDialogs…

unless you have a lot of redundant code…

john


#3

thank you john
already I tested with empty pages without codes, to see the reaction time, so I noticed that the webdialog is faster than htmldialog


#4

the initial start of the first HtmlDialog may have some overhead as CEF has to set up it’s links to SU…

it is feasible that a blank page could take longer than one with content…

test with at least :set_html('hello') for both types…

john


#5

My plugin has 630 parameters 730 language translations and 116 drop down lists.
All of it has to be populated.

Here are some times in seconds on a 5 year old PC on Windows 10 and SU 2018

Open IE 4 times
2.117058
2.057668
2.05745
2.038558

Open Chrome 4 times
1.293675
0.678351
0.647008
0.639863


#6

thank you jhon
hi gjernan ; how do you open in chrome?


#7
    html_version = RUBY_VERSION[0..2].to_f >= 2.2 && @cfgs.new_browser

    if (html_version)
      @dlg = UI::HtmlDialog.new({
        :dialog_title => title,
        :preferences_key => dialog_name,
        :scrollable => true,
        :resizable => true,
        :style => UI::HtmlDialog::STYLE_DIALOG
      })
    else
      @dlg = UI::WebDialog.new(title, false, dialog_name)
    end

    set_form_size(@dlg, width, height, left, top) if (! html_version)