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

Alpha Table VS PHP Table and Performance

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

    Alpha Table VS PHP Table and Performance

    I've been trying to figure out why my reports are so slow.

    I've made a basic query in php (select * from <tablename>) to create a simple table in php with 3000 rows.
    It took less than 5 seconds to populate my browser window.

    The same result in Alpha5 takes approximately 3 minutes with a simple page (grid only) on the same server.
    I've looked though the forums on the server and answered the following:

    -AntiVirus is not running
    -The application server is a quad core xeon with 2gb ram and gigabit ethernet.
    -The DB server is a quad core xeon with 8gb memory and gigabit ethernet.
    -I am using AlphaDAO for my transaction.

    I notice the network traffic on the application server to be very low, less than 0.01% during the running of the report, but the CPU utilization when running the report consumes 100% of one core for the duration.

    Its almost like there is something going on with the rendering of the page that may not be as efficient as it could be. All of my fields in the report are labels and text only, and there are no calculations, just raw data.

    Has anyone experienced this problem? And if so were you able to overcome it?

    Thank you as always. - Wesley
    Last edited by gobbligook; 10-28-2008, 12:09 PM.

    #2
    Re: Alpha Table VS PHP Table and Performance

    I just tried changing from the SQL Genie to a direct select statement on the table in alpha5 and I've not seen a change.

    Comment


      #3
      Re: Alpha Table VS PHP Table and Performance

      Here is the generated HTML when viewing the final page. This represents one row in the table. It doesn't look super fantastic, and nothing really jumps out at me here.

      <tr> <td class="defaultDataTD">DATA</td>
      <td class="defaultDataTD"><div style="text-align: right;">DATA</div></td>
      <td class="defaultDataTD">DATA</td>
      <td class="defaultDataTD">DATA</td>
      <td class="defaultDataTD" colspan="1">DATA</td>
      </tr>
      <tr><td class="defaultSeparatorTD" colspan="5" style="padding: 0px;" ></td></tr>

      Comment


        #4
        Re: Alpha Table VS PHP Table and Performance

        I've also tried removing formatting from the table and it has no effect.

        Comment


          #5
          Re: Alpha Table VS PHP Table and Performance

          I also thought I should add that I am running the latest version of the application server for v9. 1722_3208

          Comment


            #6
            Re: Alpha Table VS PHP Table and Performance

            Just tested ADO, it's performance is the same as AlphaDAO

            Comment


              #7
              Re: Alpha Table VS PHP Table and Performance

              This code works within 5 seconds through alpha5. I am at a loss here as to why the alpha5 generated page is so much slower.

              <html>
              <head>
              <meta name="generator" content="Alpha Five HTML Editor Version 9 Build 1772-3208">
              <title></title>
              </head>
              <body>
              <p><%a5
              dim conn as SQL::Connection
              conn.open("::Name::Connection_Name")
              dim query as C
              dim output as C
              dim data as C
              query = "select * from xxxxxxx"


              delete rs
              ? conn.Execute(query)
              dim rs as SQL::ResultSet
              rs = conn.ResultSet
              ? "<table>"
              While rs.nextrow()
              ? "<tr><td>" + rs.data(1) + "</td><td>" + rs.data(2) + "</td><td>" + rs.data(3) + "</td><td>" + rs.data(4) + "</td><td>" + rs.data(5) + "</td></tr>"
              end while
              ? "</table>"


              conn.close()

              %></p>
              </body></html>

              Comment


                #8
                Re: Alpha Table VS PHP Table and Performance

                I suppose you will have to cope with it. A5 web components are VERY slow, even when you have just one record in db you'll need some time (about 1-2 seconds) for the page to prepare. And this has nothing with net bandwidth (same thing at localhost) - just CPU time, to my mind. I do not why it is so slow (and maybe the majority of people in alpha software doesn't know either). The only solution I know is it to avoid components (at least Grid) and program a5w page manually in XBasic. Just like php. :-)

                Comment


                  #9
                  Re: Alpha Table VS PHP Table and Performance

                  Alpha components can be a bit slow because of all the ways people might use them, and all the back-end processing that needs to be considered. But not as slow as you describe. Something else is going on here. A simple grid on an A5W page should display it's 10 or 15 records within a couple seconds.

                  If you zip up a copy of your table, grid and A5W page, upload it here, maybe someone can take a look at it and even test it on another server. No promises from me, but that seems like the next step.
                  -Steve
                  sigpic

                  Comment


                    #10
                    Re: Alpha Table VS PHP Table and Performance

                    I think you are probably right Steve, there are a lot of different ways someone could use a grid control. In my case I want the grid control to show me all of my records at the same time (3000+) for a "web" report. I realize if I cut it down by 50 or so records at a time it will display those 50 within several seconds, but it is very hard to print that off as it is broken out one page at a time, or even try to guess at the location of the group of records I am interested in especially if they span several pages. It is a production application and I have staff that need quick access to the data. For now I'll have to code the report with xbasic which for the most part I am satisfied with. I wonder if alpha may build a stripped down specialized grid component for read-only tables.

                    Rashid, I agree with you on a lot of those parts. I choose alpha5 for the rapid application development component and for the pieces that I use mostly it works great. I am just encountering special cases now where I am noticing the trouble. I must admit that even with some alpha5 training and the time I've spent working with alpha5, I've said to myself more than once "I've worked on this part for hours, and I know I could code it in php (the language I know) in only a few minutes." That being said I know that if I choose to do the project with PHP only I would be spending much more time overall for the project.
                    Last edited by gobbligook; 10-29-2008, 01:42 AM.

                    Comment


                      #11
                      Re: Alpha Table VS PHP Table and Performance

                      Wesley,

                      I'm afraid your post has me really confused. I have customers that insist on grids that are 100 to 200 rows long, and even then they spend a lot of time scrolling down.

                      You say you want to create a grid with 3000 rows in order to "print it off." How do you intend to do that? Screen print?

                      If you want to print out the rows, why not just go straight to a report and skip the grid altogether?

                      Pat
                      Pat Bremkamp
                      MindKicks Consulting

                      Comment


                        #12
                        Re: Alpha Table VS PHP Table and Performance

                        Hi Pat, First off thank you for your reply.

                        While on the surface seeing a 60+ page report on one screen at one time seems ridiculous there is a legitimate need.

                        A screen print of a correctly built web report is just (in my opinion) as good as the report you describe.

                        The big difference is not the print ability as both are quite capable of that. It is the web report can be used in real time. IE: refresh page, you can see your changes. The web report gives me the flexibility to be useful as a printout or a realtime view of the database.
                        Last edited by gobbligook; 10-29-2008, 12:23 PM.

                        Comment


                          #13
                          Re: Alpha Table VS PHP Table and Performance

                          Well, a grid that puts 3000 rows on a page at once is going to take a bit of time to load. Several of us have demonstrated how easy and fast it is to hand code a screen display like this, and how fast the page will load if that's what you need.

                          This is really a case of choosing the right tool for the job. If Pat's suggestion of using a report doesn't suit you, then hand-coding can produce some pretty quick results. The grid component may not be the right tool in this circumstance.
                          -Steve
                          sigpic

                          Comment


                            #14
                            Re: Alpha Table VS PHP Table and Performance

                            If you want to display a 3000 line report to the screen, then use report to create the template and have it diplasy as html.

                            You will see a big difference as there are no grid issues in the code overhead for data input etc that the grid includes by default.

                            You can use the report genie to get the outcome you want.

                            Peter
                            Insanity: doing the same thing over and over again and expecting different results.
                            Albert Einstein, (attributed)
                            US (German-born) physicist (1879 - 1955)

                            Comment


                              #15
                              Re: Alpha Table VS PHP Table and Performance

                              That's a good idea Peter! I hadn't thought of that, but it sounds like a good, easy-to-implement solution with speedy results.
                              -Steve
                              sigpic

                              Comment

                              Working...
                              X