Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Troubleshooting Slow Performance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Troubleshooting Slow Performance

    Over the past several months, I have noticed a pretty severe slow down in performance of my web app and I'm trying to find out why.

    In Chrome console, I'm seeing tons of these warnings:
    [Violation] setTimeout handler took x ms
    [Violation] Forced reflow while executing JavaScript took x ms



    Forced Reflow.png

    Does anyone have any suggestions or pointers on how to track down where these are coming from?
    Basically they are seem to be triggered whenever I open any component in the application.


    Thanks,
    Stephen
    Last edited by iRadiate; 07-15-2019, 09:12 AM.
    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

    #2
    Re: Troubleshooting Slow Performance

    If I select the javascript link in Chrome console for one of the violations, it highlights the following:

    setTimeout(function(){classInst._findActiveLayoutRuleLow.apply(classInst,args);delete classInst;delete args;},100);},_findActiveLayoutRuleLow:function(){var flagApplyRule=typeof arguments[0]!='undefined'?arguments[0]:true;if(typeof arguments[1]=='undefined'){if(this._responsiveRulesMode=='firsttrue')flagStopOnFirstTrue=true;else flagStopOnFirstTrue=false;}else{flagStopOnFirstTrue=arguments[1];}

    This looks like Alpha generated script, but I still don't know what to do with that???
    Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

    Comment


      #3
      Re: Troubleshooting Slow Performance

      DO you have responsive rules setup as the function indicates? I have found that if you had a rule setup THEN say deleted one of the objects so that the rule doesn't apply OR you did not articulate what is to occur for each rule you might see an issue like this. I have seen it before, and I am going from memory. I think that was the issue for me.
      NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

      Comment


        #4
        Re: Troubleshooting Slow Performance

        Originally posted by CharlesParker View Post
        DO you have responsive rules setup as the function indicates? I have found that if you had a rule setup THEN say deleted one of the objects so that the rule doesn't apply OR you did not articulate what is to occur for each rule you might see an issue like this. I have seen it before, and I am going from memory. I think that was the issue for me.
        I don't think I have any responsive rules Charles.

        After doing an Audit with the Chrome Dev Tools, I seem to have 2 main issues:
        1. Preload Key Requests (Consider using <link rel=preload> to prioritize fetching resources that are currently requested later in page load.)
        2. Enable Text Compression (Text-based resources should be served with compression (gzip, deflate or brotli) to minimize total network bytes)

        Audit 1f.png

        Figuring out what to do with this information is challenging.
        I have optimized components that use pre-render at design time so I don't understand how the Preload Key Requests should be an issue.
        As for the compression, I guess I will look at trying to get IIS to force compression.
        Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

        Comment


          #5
          Re: Troubleshooting Slow Performance

          Are your using an onTimer event to refresh the page?
          e.g.
          //Fire the onTimer event every 30 seconds
          {dialog.Object}.onTimerEventStart(30000);
          or in the UX properties?
          Insanity: doing the same thing over and over again and expecting different results.
          Albert Einstein, (attributed)
          US (German-born) physicist (1879 - 1955)

          Comment


            #6
            Re: Troubleshooting Slow Performance

            Thanks Pete, don't think I have any onTimer events.

            However, I have been trying to work through the Chrome Developer Auditing Tool with some success so far.
            Here is a really useful video that explains how to use the Auditing tool ... https://www.youtube.com/watch?v=5fLW5Q5ODiE
            I'd highly recommend taking a look at this tool with your own websites.

            After installing and enabling Dynamic Compression on the IIS Server, the next Audit shows that the performance score improved slightly and Enable Text Compression is no longer flagged as an opportunity for improvement.

            Audit 1a.png

            Properly Size Images was flagged as an opportunity and pointed to a GIF being used in the Session Timeout warning. I removed the GIF, ran the audit, and once again another slight performance improvement.

            Audit 1a.png

            Avoid Enormous Network Payloads - Sounds like an obvious opportunity but what to do with this. I decided to reduce the complexity of my TabbedUI Main Tab by removing a UX that was part of the A5W page for the Main Tab. Running the Audit after doing this improved the Input Latency from 1,220ms to 40ms

            Audit 1a.png


            The biggest opportunity for improvement remains Preload Key Requests which I don't get how to change because as far as I can tell, this is what Alpha is doing behind the scenes.
            The recommendation is to "Declare preload links in your HTML to instruct the browser to download key resources as soon as possible."
            As you can see from the image below, this seems to be things like variants of Alpha styles and css.

            Preload Key Requests.png

            This last issue makes me wonder if this is the price to pay for using heavily Alpha coded components? If anyone has any further suggestions, I'd appreciate any comments!
            Last edited by iRadiate; 07-16-2019, 01:57 PM.
            Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

            Comment


              #7
              Re: Troubleshooting Slow Performance

              did you try adding in preload links to the js & css to the page?
              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

              Comment


                #8
                Re: Troubleshooting Slow Performance

                Originally posted by CharlesParker View Post
                did you try adding in preload links to the js & css to the page?
                Charles, I would if I knew exactly how and where you would do that? I'll try to play around with it and see what happens.
                Last edited by iRadiate; 07-16-2019, 01:59 PM.
                Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                Comment


                  #9
                  Re: Troubleshooting Slow Performance

                  Originally posted by peteconway View Post
                  Are your using an onTimer event to refresh the page?
                  e.g.


                  or in the UX properties?
                  Pete, I do have an auto-refresh with an interval of 120 seconds set in the UX properties for the UX on my TabbedUI main page.

                  Auto-Refresh.png
                  Last edited by iRadiate; 07-16-2019, 02:00 PM.
                  Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                  Comment


                    #10
                    Re: Troubleshooting Slow Performance

                    Silly question, but did you check the Server's Task Manager for processes or apps that are hung or consuming too much CPU? And, does a server reboot help?

                    The ~ 14 second potential time savings in one of those pics seems really quite high. Could there be throughput issues somewhere in between your workstation and the server?

                    There is one more thing for me to say, but I will have to private message you, if that is okay?

                    Comment


                      #11
                      Re: Troubleshooting Slow Performance

                      Hey Rich, not a silly question and yes, I did check CPU and Memory usage on the server. Nothing notable. It's a few years old now but still pretty decent (HP DL380 G7 with 3.47GHz Quad Xeon CPU's, 12GB RAM, and 10Gb/s NICs).

                      Server_CPU.pngServer_Memory.pngServer_Network.png

                      I don't believe there are any network performance issues, the TTL ping response is very low. Is there a better load test I could check this?

                      Please feel free to pm me, thanks.
                      Last edited by iRadiate; 07-17-2019, 09:11 AM.
                      Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                      Comment


                        #12
                        Re: Troubleshooting Slow Performance

                        Auto refresh has been prone to memory leaks on the server in the past and can cause chrome browser pages to become hugh and eventually non-responsive. you may want to remove it and reboot. See what happens.
                        Insanity: doing the same thing over and over again and expecting different results.
                        Albert Einstein, (attributed)
                        US (German-born) physicist (1879 - 1955)

                        Comment


                          #13
                          Re: Troubleshooting Slow Performance

                          So I tried adding some preload links to the <head> section of my TabbedUI a5w home page and it's main tab a5w page:

                          <link rel="preload" href="GrBlue/style.js" as="script">
                          <link rel="preload" href="GrBlue/style.css" as="style">


                          It made absolutely no difference to the Chrome dev tool audit result. Perhaps because I really don't know if I'm doing this right at all.
                          Alpha Anywhere v12.4.6.5.2 Build 8867-5691 IIS v10.0 on Windows Server 2019 Std in Hyper-V

                          Comment


                            #14
                            Re: Troubleshooting Slow Performance

                            So, a couple of other thoughts to squeeze more throughput out of traditional or IIS alpha server:

                            1. Move SSL to a front-end server, so the Alpha server doesn't have to deal with it.

                            2. Is there extra software on the client or server that information is passing through that could be slowing things down? For example, on my workstation I had installed a Web App scripting software that injected itself (on purpose) as "man in the middle" software so it could record my web interactions with the Alpha web server and play them back. Now I wonder if it slows things down a little bit, perhaps because its un-installer does not remove itself from being the "man in the middle?"

                            3. If the database and web server are separate servers, is there anything wrong with data throughput between them. From the web server measure the speed of your typical queries when run through your sql management tool of choice. Maybe try the same queries when run directly on the sql server.

                            4. Reduce the number of fields returned in a LIST or Grid. I was including a lot of redundant security information with each record so I could have client-side evaluations enable,disable,show,hide controls. Moving the common information to a my own state info variable was helpful.

                            5. If you have a lot of state variables, consider doing your own handling of them by packing them into a single string and unpacking them yourself on the client side. This way alpha isn't always having to mess with a bunch of individual strings. I don't have any stats to show this would help, but looking at how alpha was doing things it seemed like this might help just a little.

                            6. If the system has gotten slower because the database has grown to be quite a bit large then see if the database needs some indexes add to it.

                            7. If client-side response is super slow on one browser (like Safari), but not on another (like Chrome) then look at your client-side expressions. If you have a lot of them then you may have to take them all out and move the calculations to the SQL back-end and let SQL output the desired CSS Styles to achieve the desired look. Just make sure that the changes in the look are okay to be post-poned until SQL can regenerate them. (This does cause problems with single record refresh, because Alpha typically doesn't know how to execute the exact query that you need. You might be able to fix-up the query before alpha executes it, though.)

                            8. Typically you will want to use a LIST in a UX, rather than a Grid to get better speed. But I've seen some simple Grids work plenty fast.

                            9. Double-check what responses are coming back as compressed or not. To do this, go into Chrome Debugger and look at the Network traffic tab. If each response is displayed in a single line then look at the toolbar icons in the "View" group and click on the one that says "Use large request rows" when you hover over it. In the two-line format of reponses, the size column will show two numbers. The top number shows bytes received, the bottom number shows total bytes unpacked.

                            10. If you are using server-side conditionals, see if you can offload that to your SQL engine and let SQL output desired CSS style strings (or class names) that you can incorporate into you output stream. (See # 7 above)

                            11. Simplify the output of Grids and LISTS. Sometimes, you have to give up certain features and provide just the minimum amount of information or present the information in a completely different fashion. Find a way to present the information such that a minimum amount of HTML is used. I'm thinking of a case that used a custom xbasic control to spread a number (ranging from 0 to 10) across multiple columns using radio buttons. Reducing this to just a plain text number in a single column really improved performance.

                            12. Do not use a modifiable Grid if the grid contains a lot of conditionals. Instead, make the user go to a sparate window for Insert and Change mode.

                            13. If your Grid and View contain a lot of tables consider consolidating all lookup tables and related tables into a single view, so the Grid or LIST contains just two entries: 1) the main table being updated, and 2) everything else in a VIEW.

                            Comment


                              #15
                              Re: Troubleshooting Slow Performance

                              Also, check for bogus requests hitting the alpha web server.
                              Ideally, a front-end server needs to eliminate all the junk requests coming in from the hackers, so this garbage never gets to the alpha server.

                              Anyone know how to do this?

                              Comment

                              Working...
                              X