FoxInCloud
CA querys in web mode.
Gravatar is a globally recognized avatar based on your email address. CA querys in web mode.
  Arcadio Bianco
  All
  May 9, 2020 @ 01:30pm

In my Application on load form I execute the cursorfill and in the init I execute the cursorrefresh. In LAN mode this works and runs correctly. However, in web mode 2 times cursorfill is triggered, I believe this is one of the reasons that is affecting the performance of my application. Because several queries are executed unnecessarily on all adapters cursors. Below is a video that shows how I debugged the problem.

https://youtu.be/4mmDM_CKXW0

Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  May 10, 2020 @ 04:13am

Hello Arcadio,

Thank you very much for this comprehensive debug report.

When a FoxInCloud server receives a request for a form of which it does not yet has a reference to, it instantiates it, form.de.openTables() executes, and thus .cursorFill().

When the server executes the .wFormStandardPage() request, if always restores the form to the initial state, without considering whether it has just instantiated the form, thus another .cursorFill()
(could be optimised however this occurs only once per form after the server has started, not worth it).

Then, form.Init() executes with whatever parameters you pass, thus .cursorRefresh().

I suggest we check this sequence of actions in your test case; you can just:

  • Add the end of your at your debug string, just before +Chr(13)+Chr(10): + cCallingModules()
  • Execute the same test case as you previously did, plus a couple of additional user actions on the form that trigger a server response
  • Please pause between actions and group debug lines by event: desktop user event, initial instantiation, restore initial state, form.init(), first .userEvent(), second .userEvent(), etc.)
  • Post the contents of your dataMora.txt file here so that we can discuss

Maybe we'll find some unexpected behaviour requiring a fix…

Thanks in advance.

Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  May 10, 2020 @ 09:45am

I realized that every time I call a modal form, a "requery(cursorfill)" for all cursors is executed.

10/05/20 01:33:57 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.wformstandardpage > 11 easyprocess.wform > 12 awajax.forminitsave > 13 awapphost.oform > 14 awapphost.formlaunch > 15 awapphost.formlaunch_ > 16 cad_atend1.load

10/05/2020 01:33:58 PM REFRESH 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.wformstandardpage > 11 easyprocess.wform > 12 awajax.forminitsave > 13 awapphost.oform > 14 awapphost.oform_init > 15 cad_atend1_scx.init

10/05/2020 01:34:00 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.propsrestore > 14 awajax.propsrestore_ds_views > 15 wcolview.wrequeryall > 16 wcolview.wrequery

10/05/2020 01:34:00 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.formrestoreuser > 14 awajax.propsrestore > 15 awajax.propsrestore_ds_views > 16 wcolview.wrequeryall > 17 wcolview.wrequery

10/05/2020 01:35:36 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.propsrestore > 14 awajax.propsrestore_ds_views > 15 wcolview.wrequeryall > 16 wcolview.wrequery

10/05/2020 01:36:24 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.propsrestore > 14 awajax.propsrestore_ds_views > 15 wcolview.wrequeryall > 16 wcolview.wrequery

10/05/2020 01:36:46 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.propsrestore > 14 awajax.propsrestore_ds_views > 15 wcolview.wrequeryall > 16 wcolview.wrequery

10/05/2020 01:38:56 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.propsrestore > 14 awajax.propsrestore_ds_views > 15 wcolview.wrequeryall > 16 wcolview.wrequery

10/05/2020 01:40:38 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.propsrestore > 14 awajax.propsrestore_ds_views > 15 wcolview.wrequeryall > 16 wcolview.wrequery

10/05/2020 01:42:21 PM FILL 
01 easytest > 02 awserverstart > 03 awstart > 04 tmrfiletimer.timer > 05 easytestserver.processhit > 06 easytestserver.process > 07 easytestserver.routerequest > 08 easyprocess.process > 09 wwprocess.process > 10 easyprocess.methexec > 11 easyprocess.ajaxformrequest > 12 awajax.formrequest > 13 awajax.propsrestore > 14 awajax.propsrestore_ds_views > 15 wcolview.wrequeryall > 16 wcolview.wrequery


Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  May 11, 2020 @ 03:45am

Yes, each time you call a form, whether a master form or a child form, FoxInCloud requeries the 'views' (CAD.cursorFill() in your case) to restore the data to the 'initial' state (like after initial instantiation, method .awajax.formRestoreUser()), then executes form.Init() with whatever parameters you've passed, which may cause some other CAD.cursorFill().

Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  May 14, 2020 @ 06:57pm

Does this form call through "wFormmaster" need multiple "cursorfill"?

Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  May 15, 2020 @ 01:16am

OK, let's make it extra clear… when calling .wForm*():

  1. if current server has not yet instantiated that form, instantiation executes DE.openTables(), form.Load(), form.Init(.wlInitFirst), which execute requery() and/or .cursorFill(). THIS HAPPENS ONLY ONCE PER SERVER AND FORM; of course in the IDE it happens each time you start a new test.
  2. to make sure the form is in the exact same state as when the HTML was generated, regardless when the form was instantiated, FoxInCloud restores the initial state, thus executing requery() and/or .cursorFill()
  3. FoxInCloud executes the same methods as in desktop mode: form.Init(), form.refresh(), form.show(), form.activate(), etc., which execute the same requery() and/or .cursorFill() than in desktop mode.

Compared to desktop:

  • (1) executes once per server and form, and is almost negligible in production
  • (2) executes one time more compared to desktop mode

All are necessary in FoxInCloud.

Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  May 15, 2020 @ 08:33am

I understand your explanation better now. Shouldn't the "uFormsLaunchAt Startup" method leave the form instantiated and, in development mode, should it already appear on the screen during execution? This is not happening here. What could I have done wrong?

uFormsLaunchAtStartup = 'cad_atend.scx, cad_atend1.scx, index.scx, index1.scx'
Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  FoxInCloud Support - Thierry N.
  Arcadio Bianco
  May 15, 2020 @ 10:35am

Forms are visible in the IDE in development mode only (do atPJcompileDebugmode).

Indeed, FoxInCloud server instantiates all forms mentioned in .uFormsLaunchAtStartup at startup. You can see this happen in the server interface (little greyish form below)

If you want to see which forms are instantiated in the server at a given moment, go to debugger > locals, expand goWCserver.oAppHost.aForms[]

Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  Arcadio Bianco
  FoxInCloud Support - Thierry N.
  May 15, 2020 @ 01:54pm

Did not load forms reported in "uFormsLaunchAtStartup". What could I have done wrong?

Gravatar is a globally recognized avatar based on your email address. re: CA querys in web mode.
  Arcadio Bianco
  Arcadio Bianco
  May 15, 2020 @ 02:30pm

Forget it, I was reporting in the wrong place.

© 1996-2020