• xtrn/SlyVote/DDLightbarMenu.js

    From nightfox@VERT to CVS commit on Saturday, July 08, 2017 16:46:22
    xtrn/SlyVote DDLightbarMenu.js 1.2 NONE
    Update of /cvsroot/sbbs/xtrn/SlyVote
    In directory cvs:/tmp/cvs-serv746

    Removed Files:
    DDLightbarMenu.js
    Log Message:
    Removed DDLightbarMenu.js from this directory, since I've added it to sbbs\exec\load and I only want to maintain one copy of this file.


    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Digital Man@VERT to nightfox on Thursday, August 03, 2017 15:32:11
    Re: xtrn/SlyVote/DDLightbarMenu.js
    By: nightfox to CVS commit on Sat Jul 08 2017 04:46 pm

    I started checking-out SlyVote. The first thing I did was fire it up and got the "There are no voting areas configured." error. Rather than manually enter the sub-codes for all the areas I have configured to allow voting in SCFG, I just made this small modification to SlyVote.js:

    if (gSlyVoteCfg.subBoardCodes.length == 0) {
    for (var grp in msg_area.grp_list)
    for (var sub in msg_area.grp_list[grp].sub_list)
    if ((msg_area.grp_list[grp].sub_list[sub].settings & SUB_NOVOTING)
    == 0)
    gSlyVoteCfg.subBoardCodes.push(msg_area.grp_list[grp].sub_list[sub].code); }

    The formatting is hosed because of the long lines, but you get the idea. It just takes all the areas in msg_area (which the user has access to) and where voting is enabled and uses that as the list. I can commit this if you like or if you don't like it, just ignore it or maybe do something different.

    digital man

    Synchronet "Real Fact" #40:
    Synchronet has been ported to FreeBSD, NetBSD, OpenBSD, Solaris, QNX, and MacOS.
    Norco, CA WX: 95.1øF, 43.0% humidity, 16 mph ESE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Digital Man@VERT to nightfox on Thursday, August 03, 2017 15:38:47
    Re: SlyVote
    By: Digital Man to nightfox on Thu Aug 03 2017 03:32 pm

    Also, there appears to be an issue with the "topic" selection widget when the number of topics (message areas) requires scrolling: the bottom-most item initially is blank (empty), but if you hit end or scroll down, it (the bottom-most item) will populate but get stuck. Login to Vertrauen, External Programs->Main->Voting Booth to see the problem live.

    digital man

    Synchronet "Real Fact" #60:
    Free dynamic yourbbs.synchro.net hostnames were made first available in 2003. Norco, CA WX: 95.1øF, 43.0% humidity, 16 mph ESE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Thursday, August 03, 2017 16:01:26
    Re: SlyVote
    By: Digital Man to nightfox on Thu Aug 03 2017 03:32 pm

    I started checking-out SlyVote. The first thing I did was fire it up and got the "There are no voting areas configured." error. Rather than manually enter the sub-codes for all the areas I have configured to allow voting in SCFG, I just made this small modification to SlyVote.js:

    The formatting is hosed because of the long lines, but you get the idea. It just takes all the areas in msg_area (which the user has access to) and where voting is enabled and uses that as the list. I can commit this if you like or if you don't like it, just ignore it or maybe do something different.

    My idea with that was that a sysop might only want to designate certain areas specially for SlyVote. For instance, with other voting doors (such as DCT Vote), a sysop could configure different areas for different voting topics, and I wanted to have a similar feature with SlyVote. I was thinking a sysop could create local message sub-boards for various general voting topics and use those for SlyVote.

    Also, if users are allowed to choose any area where voting is enabled, my concern was that if a lot of users start using SlyVote on a particular BBS, the users could potentially flood some message areas with poll questions. That might not be very likely though..

    Perhaps I could add a configuration option to use all votable sub-boards or only ones configured in the configuration file.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Thursday, August 03, 2017 16:03:58
    Re: SlyVote
    By: Digital Man to nightfox on Thu Aug 03 2017 03:38 pm

    Also, there appears to be an issue with the "topic" selection widget when the number of topics (message areas) requires scrolling: the bottom-most item initially is blank (empty), but if you hit end or scroll down, it (the bottom-most item) will populate but get stuck. Login to Vertrauen, External Programs->Main->Voting Booth to see the problem live.

    Thanks for letting me know.. I'll check it out when I get the chance.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Thursday, August 03, 2017 19:40:26
    Re: SlyVote
    By: Digital Man to nightfox on Thu Aug 03 2017 03:32 pm

    I started checking-out SlyVote. The first thing I did was fire it up and got the "There are no voting areas configured." error. Rather than manually enter the sub-codes for all the areas I have configured to allow voting in SCFG, I just made this small modification to SlyVote.js:

    The formatting is hosed because of the long lines, but you get the idea. It just takes all the areas in msg_area (which the user has access to) and where voting is enabled and uses that as the list. I can commit this if you like or if you don't like it, just ignore it or maybe do something different.

    Also, there appears to be an issue with the "topic" selection widget when the number of topics (message areas) requires scrolling: the bottom-most item initially is blank (empty), but if you hit end or scroll down, it (the bottom-most item) will populate but get stuck. Login to Vertrauen, External Programs->Main->Voting Booth to see the problem live.

    I've committed an updated SlyVote.js and SlyVote.cfg to the Synchronet CVS, as well as an updated DDLightbarMenu.js. I added an option to SlyVote.cfg, useAllAvailableSubBoards, with a true/false value. It defaults to true, so if it doesn't exist in your SlyVote.cfg, it will be true - If true, it will use all available sub-boards where voting is enabled.

    Also, I believe the menu bug you were seeing was an off-by-1 issue when displaying the menu items. That should be fixed.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Sunday, August 06, 2017 17:15:31
    Re: exec/load/DDLightbarMenu.js
    By: Digital Man to Nightfox on Sun Aug 06 2017 02:01 pm

    One thing I'd like to see: If you have a lot of message areas that allow polls/voting, like I do, it'd be nice if the original list of "topic areas" indicated which have polls in them (most of the areas don't). Or maybe a separate menu item to scan the areas for polls (since it could take a few seconds). MsgBase.get_msg_index() might be faster than MsgBase.get_all_msg_headers() for just checking the 'attr' property.

    I just committed an update to SlyVote.js in CVS that will show a check mark in the area list next to areas that have polls in them. Please let me know if you think that looks okay.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Monday, August 07, 2017 18:03:08
    Re: SlyVote
    By: Nightfox to Digital Man on Sun Aug 06 2017 05:15 pm

    Re: exec/load/DDLightbarMenu.js
    By: Digital Man to Nightfox on Sun Aug 06 2017 02:01 pm

    One thing I'd like to see: If you have a lot of message areas that allow polls/voting, like I do, it'd be nice if the original list of "topic areas" indicated which have polls in them (most of the areas don't). Or maybe a separate menu item to scan the areas for polls (since it could take a few seconds). MsgBase.get_msg_index() might be faster than MsgBase.get_all_msg_headers() for just checking the 'attr' property.

    I just committed an update to SlyVote.js in CVS that will show a check mark in the area list next to areas that have polls in them. Please let me know if you think that looks okay.

    It works and looks fine, but it takes 2 minutes to scan all my messages bases and displays no progress indicator while it's doing so. You can see for yourself at vert.synchro.net. Are you using get_msg_index() or get_all_msg_headers()?

    digital man

    Synchronet "Real Fact" #77:
    Rob Swindell still has dozens of BBS-related magazines in his possession. Norco, CA WX: 85.5øF, 48.0% humidity, 7 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Monday, August 07, 2017 18:43:06
    Re: SlyVote
    By: Digital Man to Nightfox on Mon Aug 07 2017 06:03 pm

    It works and looks fine, but it takes 2 minutes to scan all my messages bases and displays no progress indicator while it's doing so. You can see for yourself at vert.synchro.net. Are you using get_msg_index() or get_all_msg_headers()?

    Interesting.. On my BBS it loads fairly quick (about a second or so). I'm using get_msg_index() - You said that should be faster, correct?

    I just committed a change where it now says "Loading areas..." when it's scanning the message areas.

    If it might take that long to display the sub-boards, I wonder if there's a faster way it can check to see if there are polls in a sub-board..

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Monday, August 07, 2017 20:46:31
    Re: SlyVote
    By: Nightfox to Digital Man on Mon Aug 07 2017 06:43 pm

    Re: SlyVote
    By: Digital Man to Nightfox on Mon Aug 07 2017 06:03 pm

    It works and looks fine, but it takes 2 minutes to scan all my messages bases and displays no progress indicator while it's doing so. You can see for yourself at vert.synchro.net. Are you using get_msg_index() or get_all_msg_headers()?

    Interesting.. On my BBS it loads fairly quick (about a second or so). I'm using get_msg_index() - You said that should be faster, correct?

    Right. Much faster.

    I just committed a change where it now says "Loading areas..." when it's scanning the message areas.

    That's an improvement.

    If it might take that long to display the sub-boards, I wonder if there's a faster way it can check to see if there are polls in a sub-board..

    1. I have a lot of sub-boards (100+), but most of them don't allow voting. Are you only checking the sub-boards that allow voting?

    2. You might be doing something else after you open the message base and read the index (or before you close it) which is slowing down the scan. I guess I could have a look-see at your code if you can't find it.

    3. I was testing this on bbs.synchro.net which runs in a Win7-32 VM (ontop of Win10-64) and accesses the BBS data (including message bases) over a (GbE) LAN. Not as fast as a local disk, but still usually plenty fast for loading/scanning files.

    digital man

    Synchronet/BBS Terminology Definition #10:
    CVS = Concurrent Versioning System
    Norco, CA WX: 75.5øF, 67.0% humidity, 4 mph ESE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Digital Man@VERT to Nightfox on Monday, August 07, 2017 21:05:47
    Re: SlyVote
    By: Nightfox to Digital Man on Mon Aug 07 2017 06:43 pm

    On a slightly unrelated note: Do you mind renaming your "Read Me.txt" files to just "readme.txt"? If you notice, it messes up some of my CVS scripts: http://cvs.synchro.net/commitlog.ssjs

    I make it a habit of not putting spaces (or other special characters) in filenames unless absolutely necessary. I guess I just assumed other CVS contributors would follow suit. :-)

    digital man

    Synchronet/BBS Terminology Definition #7:
    BPS = Bits Per Second
    Norco, CA WX: 74.6øF, 69.0% humidity, 1 mph SE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tuesday, August 08, 2017 09:28:11
    Re: SlyVote
    By: Digital Man to Nightfox on Mon Aug 07 2017 08:46 pm

    If it might take that long to display the sub-boards, I wonder if
    there's a faster way it can check to see if there are polls in a
    sub-board..

    1. I have a lot of sub-boards (100+), but most of them don't allow voting. Are you only checking the sub-boards that allow voting?

    Yes, only the sub-board codes for sub-boards that allow voting will be used in SlyVote (I used your code that you posted several days ago for that).

    2. You might be doing something else after you open the message base and read the index (or before you close it) which is slowing down the scan. I guess I could have a look-see at your code if you can't find it.

    It's not doing anything else. I added a function for checking to see whether a sub-board has polls:

    function subBoardHasPolls(pSubBoardCode)
    {
    var subBoardHasPolls = false;
    var msgbase = new MsgBase(pSubBoardCode);
    if (msgbase.open())
    {
    for (var i = 0; !subBoardHasPolls && (i < msgbase.total_msgs); ++i)
    {
    var msgIdx = msgbase.get_msg_index(true, i);
    if ((msgIdx == null) || ((msgIdx.attr & MSG_DELETE) == MSG_DELETE))
    continue;
    if ((msgIdx.attr & MSG_POLL) == MSG_POLL)
    subBoardHasPolls = true;
    }

    msgbase.close();
    }
    return subBoardHasPolls;
    }


    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Nightfox@VERT/DIGDIST to Digital Man on Tuesday, August 08, 2017 09:29:03
    Re: SlyVote
    By: Digital Man to Nightfox on Mon Aug 07 2017 09:05 pm

    On a slightly unrelated note: Do you mind renaming your "Read Me.txt" files to just "readme.txt"? If you notice, it messes up some of my CVS scripts: http://cvs.synchro.net/commitlog.ssjs

    I make it a habit of not putting spaces (or other special characters) in filenames unless absolutely necessary. I guess I just assumed other CVS contributors would follow suit. :-)

    I can do that. I hadn't thought of that and didn't know it would be an issue.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Tuesday, August 08, 2017 11:56:32
    Re: SlyVote
    By: Nightfox to Digital Man on Tue Aug 08 2017 09:28 am

    Re: SlyVote
    By: Digital Man to Nightfox on Mon Aug 07 2017 08:46 pm

    If it might take that long to display the sub-boards, I wonder if
    there's a faster way it can check to see if there are polls in a
    sub-board..

    1. I have a lot of sub-boards (100+), but most of them don't allow voting. Are you only checking the sub-boards that allow voting?

    Yes, only the sub-board codes for sub-boards that allow voting will be used in SlyVote (I used your code that you posted several days ago for that).

    2. You might be doing something else after you open the message base and read the index (or before you close it) which is slowing down the scan. I guess I could have a look-see at your code if you can't find it.

    It's not doing anything else. I added a function for checking to see whether a sub-board has polls:

    function subBoardHasPolls(pSubBoardCode)
    {
    var subBoardHasPolls = false;
    var msgbase = new MsgBase(pSubBoardCode);
    if (msgbase.open())
    {
    for (var i = 0; !subBoardHasPolls && (i < msgbase.total_msgs); ++i)
    {
    var msgIdx = msgbase.get_msg_index(true, i);
    if ((msgIdx == null) || ((msgIdx.attr & MSG_DELETE) == MSG_DELETE))
    continue;
    if ((msgIdx.attr & MSG_POLL) == MSG_POLL)
    subBoardHasPolls = true;
    }

    msgbase.close();
    }
    return subBoardHasPolls;
    }

    I'll play with tuning that in a couple of days. The first thing I notice is the reference to msgbase.total_msgs in your loop. It would be an improvement in speed to cache this property in a local variable as every time you read that property, the underlying code in the MsgBase class goes and reads the status of the message base:

    var total_msgs = msgbase.total_msgs;
    for (var i = 0; !subBoardHasPolls && (i < total_msgs); ++i)

    I tried this enhancement on Vert and it made only a slight improvement in performance, so that's not the main issue. It could be a problem in the get_msg_index method. I'll look into it.

    digital man

    Synchronet "Real Fact" #16:
    Synchronet first supported FidoNet networking (with SBBSFIDO) in 1992.
    Norco, CA WX: 86.9øF, 46.0% humidity, 8 mph ESE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ telnet://vert.synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tuesday, May 19, 2020 14:07:44
    Re: SlyVote
    By: Digital Man to Nightfox on Tue Aug 08 2017 11:56 am

    I'll play with tuning that in a couple of days. The first thing I notice is the reference to msgbase.total_msgs in your loop. It would be an improvement in speed to cache this property in a local variable as every time you read that property, the underlying code in the MsgBase class goes and reads the status of the message base:

    var total_msgs = msgbase.total_msgs;
    for (var i = 0; !subBoardHasPolls && (i < total_msgs); ++i)

    I tried this enhancement on Vert and it made only a slight improvement in performance, so that's not the main issue. It could be a problem in the get_msg_index method. I'll look into it.

    Hi DM - I know this is an old message I'm replying to - we were discussing speed-related issues when I was initially working on SlyVote. I was curious if you had ever found anything that might help the speed issues we had noticed?
    Not too long ago, I had made an update to dd_lightbar_menu.js so that rather than having to add/copy all the menu items into the menu object, you can replace a couple functions (for the menu to get the number of items and to retreive an item for display & it return code), so a menu can basically access another source of items. I originally did that for my message reader, but I then updated SlyVote to do that, as I think that might provide a bit of a speed improvement.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Tuesday, May 19, 2020 15:00:19
    Re: SlyVote
    By: Nightfox to Digital Man on Tue May 19 2020 02:07 pm

    Re: SlyVote
    By: Digital Man to Nightfox on Tue Aug 08 2017 11:56 am

    I'll play with tuning that in a couple of days. The first thing I notice is the reference to msgbase.total_msgs in your loop. It would be an improvement in speed to cache this property in a local variable as every time you read that property, the underlying code in the MsgBase class goes and reads the status of the message base:

    var total_msgs = msgbase.total_msgs;
    for (var i = 0; !subBoardHasPolls && (i < total_msgs); ++i)

    I tried this enhancement on Vert and it made only a slight improvement in performance, so that's not the main issue. It could be a problem in the get_msg_index method. I'll look into it.

    Hi DM - I know this is an old message I'm replying to - we were discussing speed-related issues when I was initially working on SlyVote. I was curious if you had ever found anything that might help the speed issues we had noticed?

    I added the MsgBase.get_index() method about a year ago for use in msglist.js which enhanced the performance considerable. Have you tried using that?

    digital man

    This Is Spinal Tap quote #5:
    Nigel Tufnel: Authorities said... best leave it... unsolved.
    Norco, CA WX: 68.5øF, 44.0% humidity, 9 mph NNE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tuesday, May 19, 2020 17:00:14
    Re: SlyVote
    By: Digital Man to Nightfox on Tue May 19 2020 03:00 pm

    I added the MsgBase.get_index() method about a year ago for use in msglist.js which enhanced the performance considerable. Have you tried using that?

    Yes, SlyVote uses get_index if it's available.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Tuesday, May 19, 2020 19:12:46
    Re: SlyVote
    By: Nightfox to Digital Man on Tue May 19 2020 05:00 pm

    Re: SlyVote
    By: Digital Man to Nightfox on Tue May 19 2020 03:00 pm

    I added the MsgBase.get_index() method about a year ago for use in msglist.js which enhanced the performance considerable. Have you tried using that?

    Yes, SlyVote uses get_index if it's available.

    I don't recall if I tried SlyVote since you made that change. Since my Synchronet files are on a samba share (over a gigabit LAN), that tends to highlight I/O-bound processes very well.

    digital man

    This Is Spinal Tap quote #4:
    David St. Hubbins: He died in a bizarre gardening accident...
    Norco, CA WX: 64.2øF, 53.0% humidity, 7 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net