IA7 web icon status/update - solved?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

IA7 web icon status/update - solved?

Jeff Huettner
So I did a little more digging, and I think I see whats going on.  In sub json_object_detail (in json_server.pl), the following logic exists:

elsif ( $request_time >= ( $current_time - $object->get_idle_time ) ) {

              #Should get_tickcount be replaced with output_time??
              #Object has not changed since time, so return undefined
              return;
}


Presumably, this logic exists to eliminate unnecessary status updates by detecting when an object was last updated and skipping sending it if not recent.  However, since all three time values are in seconds, I believe that I'm seeing valid objects get skipped, likely due to rounding errors when converting from ms to seconds.  Since changing the conditional to this:

elsif ( $request_time-1 > ( $current_time - $object->get_idle_time ) ) {

I have not seen a failed update.  I started to go down the path of comparing milliseconds, but adding ms idle time to Generic_Item() was more than I could bite off over lunch.

Curious if this makes sense, an/or if anyone else is willing to try the change.

Regards,
Jeff

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: IA7 web icon status/update - solved?

Joel Davidson-2
I just made the change to my json_server.pl and will watch things for a
day or two and let you know what happens.  First look shows it working
correctly.  Thanks Jeff.

Joel

On Tue, 6 Dec 2016, it would appear that Jeff Huettner wrote:

> So I did a little more digging, and I think I see whats going on.  In sub json_object_detail (in json_server.pl), the following logic exists:
>
> elsif ( $request_time >= ( $current_time - $object->get_idle_time ) ) {
>
>               #Should get_tickcount be replaced with output_time??
>               #Object has not changed since time, so return undefined
>               return;
> }
>
>
> Presumably, this logic exists to eliminate unnecessary status updates by detecting when an object was last updated and skipping sending it if not recent.  However, since all three time values are in seconds, I believe that I'm seeing valid objects get skipped, likely due to rounding errors when converting from ms to seconds.  Since changing the conditional to this:
>
> elsif ( $request_time-1 > ( $current_time - $object->get_idle_time ) ) {
>
> I have not seen a failed update.  I started to go down the path of comparing milliseconds, but adding ms idle time to Generic_Item() was more than I could bite off over lunch.
>
> Curious if this makes sense, an/or if anyone else is willing to try the change.
>
> Regards,
> Jeff

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users

Reply | Threaded
Open this post in threaded view
|

Re: IA7 web icon status/update - solved?

Joel Davidson-2
btw, it's line 862 in json_server.pl in case anyone wants to try
the fix.

On Tue, 6 Dec 2016, it would appear that Joel Davidson wrote:

> I just made the change to my json_server.pl and will watch things for a
> day or two and let you know what happens.  First look shows it working
> correctly.  Thanks Jeff.
>
> Joel
>
> On Tue, 6 Dec 2016, it would appear that Jeff Huettner wrote:
>
> > So I did a little more digging, and I think I see whats going on.  In sub json_object_detail (in json_server.pl), the following logic exists:
> >
> > elsif ( $request_time >= ( $current_time - $object->get_idle_time ) ) {
> >
> >               #Should get_tickcount be replaced with output_time??
> >               #Object has not changed since time, so return undefined
> >               return;
> > }
> >
> >
> > Presumably, this logic exists to eliminate unnecessary status updates by detecting when an object was last updated and skipping sending it if not recent.  However, since all three time values are in seconds, I believe that I'm seeing valid objects get skipped, likely due to rounding errors when converting from ms to seconds.  Since changing the conditional to this:
> >
> > elsif ( $request_time-1 > ( $current_time - $object->get_idle_time ) ) {
> >
> > I have not seen a failed update.  I started to go down the path of comparing milliseconds, but adding ms idle time to Generic_Item() was more than I could bite off over lunch.
> >
> > Curious if this makes sense, an/or if anyone else is willing to try the change.
> >
> > Regards,
> > Jeff
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/xeonphi
> ________________________________________________________
> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>
>

--
Joel Davidson
Austin, TX
[hidden email]

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users