WordPress.org

Ready to get started?Download WordPress

Forums

StatPress Visitors
[resolved] [Plugin: Statpress Visitors] very very slow (20 posts)

  1. simplex0r
    Member
    Posted 3 years ago #

    Hi, i've just switched from statprss reloaded to statpress visitors, because the previous one broke itself when i updated to wordpress 3.1.
    statpress visitors works well but it's terribly slow, it needs ~10 seconds to load the main page and during this time the website isn't reachable.
    I've noticied that there's an huge use of the db during this time..
    Size of the db are: StatPress table size: 16,22 MB (97904 records)
    Any hints?
    Thanks

    http://wordpress.org/extend/plugins/statpress-visitors/

  2. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    That's because this version allows you to browse all the days of the database. Queries that verify the existence of page and post for each day of the database has slowed its implementation. Indeed, we must verify the existence of site page or posts for each day of the DB and calculate the number of pages.

    Should I design a lite version that does not see the attendance for all days of the database, but only the current periode of time ? In this case, then it will be very fast, but will not see the attendance for all days of database.
    what do you prefer ?
    Should I write a lite version?

  3. simplex0r
    Member
    Posted 3 years ago #

    It could be incremental, if possible.
    I mean, it could parse the overwiew tab and the last 20 days and if i want to see older entries when i click on day 21 it will parse older days from 21 to 40, for example.
    Could this be possible?

  4. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    Now, i correct the main SQL query, it work quickly !

  5. simplex0r
    Member
    Posted 3 years ago #

    Awesome!
    Waiting for next release, then..
    Another thing, when you install the plugin from the dashboard it can't be activated, because the download is a zip file and you've to manually extract it to have the possibility to activate the plugin.
    This could be difficult for someone that isn't expert or doesn't have direct access to the webserver.

  6. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    Currently, you can see every day from the database. If the options you have chosen to display charts of 21 days, you can see the 21 previous days by clicking on "Days" Or "Period Days 1 2 3. Each number is a period of 21 days (depending on your options).
    It is possible to write a lighter version that does not sail on all days of the database, but only the last 21 days (or 7, 15, 31, 62 depending on your options). This will further accelerate its speed by reducing the number of SQL queries.

    If u want a lite verssion, i write it !
    As you want !

  7. simplex0r
    Member
    Posted 3 years ago #

    let's keep in touch,
    this is my mail: simplex at twopenguins.it
    write me one so i'll have yours.
    i'll delete this post when i'll have your mail/response

  8. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    I sent you an email

  9. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    YOU said "Another thing, when you install the plugin from the dashboard it can't be activated, because the download is a zip file and you've to manually extract it to have the possibility to activate the plugin.
    This could be difficult for someone that isn't expert or doesn't have direct access to the webserver.
    "
    I had great difficulty in understanding of "subversion" that can offer file downloads with WordPress.
    So I made many mistakes, but now after hours of effort, I understood how it works.
    It is easier to write a plugin to offer download on WordPress! And this is amazing!
    Sorry for all my beginner errors !

  10. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    @luciole135

    What you said interested me.

    How much of a reduction in latency can those optimizations you mention net you ?

    I'm using blackbox debug plugin to see the latency load for my sqls. It reports i am getting 2k latency+ just from kstats reloaded !!!

    Hows the latency load for your plugin compared to kstats reloaded ?

  11. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,
    I can not measure the load latency cause my web host forbids me to install plugins for stats, I can only do so on localhost and so the results are not comparable.
    However, if you test it on your site, the results are comparable because the databases are identical.
    You can install without any problem temporarily Statpress Visitors to your site cause it is compatible with all fork of statpress (except with newstatpress that modify the data table statpress).

    Queries regarding the difference between visitors and the other fork of statpress is in the number of SQL queries made ​​to display a graph.

    On page « Overview », Statpress-visitors is faster than the other Statpress (2 sec to 10 sec, with a large database over 45,000 records) because we did not make the graphs in the same way :

    Statpress Visitors needs only 4 SQL query to make a graph. All other fork of Statpress need as many SQL Queries that there is colored rectangles displayed on a graph ! Thus, if the graph shows 20 days, there are 20 times more SQL queries; if the graph shows 50 days, there are 50 times more SQL queries.

    That's why Visitors is faster than all other fork, cause it work with a new and better method.

    Best regards

  12. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    Hm...

    I want to show in a widget to show a

    1. total number of to my site ever
    2. total visitors today
    3. how many users are currently online

    So this is all the stats anybody sees pretty much on the site.

    Admin panel will have the full details like how many, and who came to your site for a full year.

    Can your plugin do all that with reduced load :d ?

  13. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,
    Currently, you can see in the widget:
    1. total number of the site ever
    2. total visitors today
    3. how many users are currently online
    and much more if you want.

    But in the admin, you can not see the total number of visitors for a full year. It's a good idea and I'll include it in the next version 1.1 as well as those of last year.

    These SQL queries are not those who consume lots of CPU time because it is the more simple to be done to a server.

    Compared to the current version 1.0.10, it will create 8 additional queries (out of 33 existing), an increase of 25% load. By putting only the current year, it will create 4 additionals queries, an increase of 12.5% load.
    With the new account of "visitors feeds" introduced by the forthcoming version 1.1, then there will be 49 queries.
    In comparison, all versions of WordPress make 109 queries in the overview page to display 20 days in a graph. For a graph of 30 days they made 149 queries. For a graph of 50 days, they made 229 queries.

    Statpress visitors display a graph in 4 queries regardless the number of days displayed.

    Then you see, Statpress Visitors is more faster.

    I look the ks_stats reloaded data tables and these data tables are not compatible with the other fork of statpress, my apologize.

    But as these data tables have not the same name, there is no compatibility issues. You will start only at 0.

    Best regard

  14. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    is there a way to migrate my kstats reloaded stats like total visitors and etc over ?

    I'm a bit reluctant to start back from 0 visitors :{ after all that work.

  15. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,
    Well, I'll write a plugin to do it, but I need time to do so.
    For now, I work on the new Visitors 1.1.
    As soon as I finished, I will write it, I promise.

    cordially

  16. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    no rush.

    my site got knocked down so gonna take a while to restore anywayz.

  17. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    My website is back up again.

    85% roughly restored anywayz :x lulz.

    http://mognet.no-ip.info

  18. luciole135
    Member
    Plugin Author

    Posted 3 years ago #

    Happy for u,
    Your site is beautiful, I came to understand just because English is not my natural language. I use Google translate for visiting foreign sites.
    But yours is not understandable.
    best regards

  19. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    I could integrate translations if you want ?

    I assumed that google translations would work on my site :/ odd.

  20. Moogle Stiltzkin
    Member
    Posted 3 years ago #

    actually after looking at the translation plugin, it adds too many bugs and conflicts. So at the moment i will skip that for now until it becomes more stable.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic