This project has moved. For the latest updates, please go here.

Form Load Speed

Feb 8, 2016 at 6:00 AM
Hi,
Really liking this form builder, but I have one question, We are using sharepoint online/ o365 and when you click on New Item there is an approx 3 second delay where the original form displays before the SpEasy Form formatting takes place. Is this normal behaviour?

Cheers
Gary
Coordinator
Feb 8, 2016 at 8:43 PM
Edited Feb 9, 2016 at 12:03 AM
Hi Gary,

It's certainly normal for there to be a delay. How long a delay depends on many things of course, including how snappy is your infrastructure, and sadly office 365 is not very snappy IMHO. A 2-3 second delay is not unusual on my E3 office 365 subscription. It is not all the time though. When I started writing this reply, I was getting 6-8 seconds a page load on my forms, with a 2-3 second delay for speasyforms, and not too surprised. I just tried it again however, to double check some stuff, and now I'm getting 2 second page loads, with maybe a 1 second delay between the form load and speasyforms showing the form, and its only maybe 15 minutes later.

Anyway, when I was getting slow page loads and a long delay, I did a little analysis, and from the network and profiling tabs in IE developer tools, I see stuff like:

userdisp.aspx ~ 1 second (I just did this and go .93 seconds)
usergroup.asmx ~ 1 second (just got .95 seconds)

These are 2 calls I'm making to get information about the current user. Fortunately, I am calling them asynchronously, and they do show as occurring simultaneously, but still a second is a long time.
As an aside, I'd much rather be calling the user profile service to get information on the user, but on my office 365 site this consistently takes a whopping 8 seconds, so I switched to using userdisp.aspx and parsing the page (which usually takes about a half second, but given the results I just gave above, it varies by things like time of day, and alignment of the stars, and I don't know what!!!). Anyway, calling the user profile web service from JavaScript takes about 200 ms from my on prem SharePoint 2013, and at least 8 seconds on my office 365 subscription. That's not good.
In general, calling web services to get my configuration, and information about the current user and environment, is certainly going to cause some delay, and my limited observation is that the delay is by far the worst on sharepoint online/office 365. Its also much worse in IE than say in Firefox. Just loading my home page in Firefox is 2-3 times faster than loading it with IE. Figure that one out, since I do have minimal download strategy turned on, which works for IE but not for Firefox.

I am caching as much as I can, in order to minimize the asynchronous calls for each page load, but I can't really cache things like the configuration or the current user's groups. Anyway, when I was getting 3 second dalays a few minutes ago, the profiler showed that 2.3 seconds of that was spent in $.ajax, which is what is under the hood of SPServices web service calls, and there isn't a hole lot I can do to make that faster except provide less functionality.

Joe
Coordinator
Feb 10, 2016 at 12:42 PM
Edited Feb 10, 2016 at 12:43 PM
btw, you side the original form displays during the delay? That's not normal, it should be a blank form (i.e. no visible fields, just the save and cancel button).

Joe
Feb 17, 2016 at 3:34 AM
Hi Joe

The speed is not really the issue for me, but I am seeing the original form for a few seconds before it renders properly

In my original form I have about 14 fields and 3 of are lookups to take advantage of your brilliant cascading lookup, on the form itself I have an accordion and a tabs area
I get a delay of 3 seconds and then the new form. If I did not get to see the original form then I could use this, but there is just enough time for users to try and start adding to the form.

I built a simpler form with 2 tabs and 3 fields and am still seeing the original form before the new form. I really hope that you can give me an answer for this because I am really keen on these forms

Cheers
Gary
Coordinator
Feb 24, 2016 at 1:42 AM
Edited Feb 24, 2016 at 8:17 PM
Hi Gary,

Sorry to take so long getting back to you, its been a crazy week. I do have an answer for you, but only if you're willing to modify the master page. This has always been a bit of a problem for SPEasyForms (and any solution using JavaScript to modify forms post render, the script just gets called too late). Anyway, shortly after my first release I wrote a blog post titled Why is my form so jumpy? that gave instructions for how to create a smoother experience with a little CSS and JavaScript in the master page. The basic idea is that if you completely hide the form (i.e. the table with class ms-formtable), SPEasyForms will automatically show it whenever its done its work.

With this latest release, I've tried to make this unnecessary (at least for Office 365 and SharePoint 2013) by hooking the OnPreRender event of Client Side Rendering and hiding the form programmatically. Then SPEasyForms does its work and shows the form. This works fine for me in my Office 365 E3 environment (and 2013) in team sites and publishing, and with or without Minimal Download Strategy enabled (except for F5/refresh, and even then it usually works, besides that's not really a case I'm that worried about). Not sure why it would be working differently for you? But anyway, hiding the form in the master page is a more sure-fire solution if you're willing, since then you're not really dependent on the SharePoint page life cycle.

Joe
Marked as answer by mcsheaj on 3/4/2016 at 5:14 AM