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 classgoes
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.
Re: SlyVotebe
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
curiousan 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
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?
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 368 |
Nodes: | 16 (2 / 14) |
Uptime: | 53:37:34 |
Calls: | 7,887 |
Calls today: | 1 |
Files: | 12,962 |
Messages: | 5,788,817 |