New version 0.5.0-rc3 is out

Keep up to date with EG related information here.
User avatar
kgschlosser
Site Admin
Posts: 5440
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc3 is out

Post by kgschlosser » Wed Jul 05, 2017 5:19 pm

@someguy1

And these spikes didn't happen before?

Also how many CPU cores do you have? This is going to let me get a better idea of actual CPU usage. So if you have a 4 core processor the highest EG will ever use is 25% because EG is not coded using multiprocess so it is not a true multicore program. And it is able to only use on core. So if you have an 8 core processor the max per core would be 12.5 and if you are using 10 then technically speaking you are at 80% which is a heck of a spike.

And this spike didn't take place before? And you have to watch carefully because there are 2 EventGhost processes that are going to be running. Look at the memory use. Which ever one is highest is the one that is the "running" EventGhost the other is there to send the data through the pipe and should use about 20meg of memory. And then quickly disappear.

I am not currently home. Otherwise I would attach the file. But if you go onto the EventGhost GitHub located here.
https://github.com/EventGhost/EventGhos ... medPipe.py

Copy that code and paste it into the NamedPipe.py file. Overwriting everything in that file. It's a different means to solve the issue and we can see if it removes that spike in CPU use
If you like the work I have been doing then feel free to Image

User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: New version 0.5.0-rc3 is out

Post by topix » Wed Jul 05, 2017 6:38 pm

I think the spike comes because the keyboard triggers autohotkey which will then start EG -e while the remote control directly sends event within EG.

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc3 is out

Post by Luca Brasi » Wed Jul 05, 2017 7:12 pm

ok, thank you, working great
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

someguy1
Posts: 34
Joined: Sun Mar 02, 2014 2:09 pm

Re: New version 0.5.0-rc3 is out

Post by someguy1 » Wed Jul 05, 2017 10:43 pm

kgschlosser wrote:@someguy1

And these spikes didn't happen before?

Also how many CPU cores do you have? This is going to let me get a better idea of actual CPU usage. So if you have a 4 core processor the highest EG will ever use is 25% because EG is not coded using multiprocess so it is not a true multicore program. And it is able to only use on core. So if you have an 8 core processor the max per core would be 12.5 and if you are using 10 then technically speaking you are at 80% which is a heck of a spike.

And this spike didn't take place before? And you have to watch carefully because there are 2 EventGhost processes that are going to be running. Look at the memory use. Which ever one is highest is the one that is the "running" EventGhost the other is there to send the data through the pipe and should use about 20meg of memory. And then quickly disappear.

I am not currently home. Otherwise I would attach the file. But if you go onto the EventGhost GitHub located here.
https://github.com/EventGhost/EventGhos ... medPipe.py

Copy that code and paste it into the NamedPipe.py file. Overwriting everything in that file. It's a different means to solve the issue and we can see if it removes that spike in CPU use
Okay i tested it with the older EG version now, the cpu spikes are there too. Sorry I didn't test this before, thought it's the new EG version that's causing the spikes. Anyway EG isn't responsible for the full 10% spike, when I look at the EG service and push a hue-assigned keyboard button I can max see a 3% spike on it, mostly just 1%. I have 4 cores.

The new code you gave me makes EG not start at all, so i reverted back to the old one topix gave me.

User avatar
kgschlosser
Site Admin
Posts: 5440
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc3 is out

Post by kgschlosser » Thu Jul 06, 2017 12:03 am

@someguy1

it's cool about not testing it before hand. you really had no reason to. all you did was give us the current information you had available to you. which works. and TY for going through the effort of back dating EG and testing it to see if it was there as well. that does help a lot. and you confirmed that it is there as well. because EG is so nested into the windows API windows could be doing something that is tied to a macro that you are running. so we want you to look at the process list and see where the spike is coming from and also because in that split second instance there are actually 2 EventGhost processes that are running as well. we would need to know which one is having a spike. narrows down where to look for a possible problems in the code. so I do thank you for the time you have put in to work through this problem and to also give us the information we needed to make the best possible code correction.

as far as the other code not working something could have happened when copy and pasting it. so I have attached the file just in case you wanted to give it a go.

I would be curious to know if there is any change in the CPU use between the 2. I wasn't sure if the use of regex would be more or less. it would probably be so tiny one way or the other it wouldn't be noticeable.
Attachments
NamedPipe.py
(10.04 KiB) Downloaded 136 times
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5440
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc3 is out

Post by kgschlosser » Thu Jul 06, 2017 12:04 am

@Luca Brasi

no worries m8
If you like the work I have been doing then feel free to Image

bskchaos
Experienced User
Posts: 56
Joined: Tue Mar 25, 2008 3:04 pm

Re: New version 0.5.0-rc3 is out

Post by bskchaos » Fri Jul 07, 2017 2:34 am

AutoRepeat is slow.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc3">
    <Folder Name="OSD" XML_Guid="{9AEBF6C4-9521-409D-8695-2B412C957D73}" Expanded="True">
        <Macro Name="Increase Volume" XML_Guid="{D79203BF-F87C-4C6C-9E13-F2ADAD550197}">
            <Event Name="G500.Button.232" XML_Guid="{F831EC01-59FA-4CFF-8641-964FFB57B605}" />
            <Event Name="KB.Button.2" XML_Guid="{6C990A2F-EDE9-4718-AF20-F270ACB26890}" />
            <Action XML_Guid="{DC87FE0E-8B6E-4FBF-8D41-4813920A176B}">
                System.ChangeMasterVolumeBy(5.0, u'Speakers (Creative SB X-Fi)')
            </Action>
            <Action XML_Guid="{A313D271-8BC8-4DFD-AF6A-D884571FC7F4}">
                EventGhost.ShowOSD(u'{"c" *int(round(eg.result) * 0.20) + "g" *int(round(100-(eg.result)) * 0.20)}', u'0;-12;0;0;0;400;0;0;0;2;3;2;1;18;Webdings', (255, 255, 255), (0, 0, 0), 3, (8, 48), 0, 2.0, u'Default')
            </Action>
            <Action XML_Guid="{9358A490-C763-4F3B-9292-C0EC0F35185B}">
                EventGhost.AutoRepeat(0.25, 0.05, 0.01, 0.2)
            </Action>
        </Macro>
        <Macro Name="Decrease Volume" XML_Guid="{67DA1649-32A1-40F0-9207-E1845A02AC46}">
            <Event Name="G500.Button.233" XML_Guid="{DC0831D1-BF6A-4581-AB80-0CF719670491}" />
            <Event Name="KB.Button.1" XML_Guid="{E681EFA6-B2EB-4F69-AC16-8F4329A8FD6D}" />
            <Action XML_Guid="{07A2BF61-FD2C-494B-9ABA-188A691174A7}">
                System.ChangeMasterVolumeBy(-5.0, u'Speakers (Creative SB X-Fi)')
            </Action>
            <Action XML_Guid="{87359D8F-4CCA-4E41-88C5-4CB0200D185C}">
                EventGhost.ShowOSD(u'{"c" *int(round(eg.result) * 0.20) + "g" *int(round(100-(eg.result)) * 0.20)}', u'0;-12;0;0;0;400;0;0;0;2;3;2;1;18;Webdings', (255, 255, 255), (0, 0, 0), 3, (8, 48), 0, 2.0, True)
            </Action>
            <Action XML_Guid="{225C001F-4D7D-415D-8926-1927B46DF90D}">
                EventGhost.AutoRepeat(0.25, 0.05, 0.01, 0.2)
            </Action>
        </Macro>
        <Macro Name="Mute Sound Card" XML_Guid="{C6FFA64B-77AA-4178-AE3B-BF211DF3123D}">
            <Event Name="HID.Button.2" XML_Guid="{14054014-1E92-4069-97D8-40EB6F211DB6}" />
            <Action XML_Guid="{80782F27-FF15-46C6-8ABB-30E0E062C057}">
                System.ToggleMute(0)
            </Action>
            <Event Name="KB.Button.0" XML_Guid="{6C30E839-2A56-48F2-AFDA-C4339E3D1CB4}" />
        </Macro>
        <Macro Name="Show OSD: Mute ON" XML_Guid="{D3983573-A016-46DE-A27C-6CA11BC5326E}">
            <Event Name="System.UnMute" XML_Guid="{8041DC5B-F0C8-4DBA-A964-9DEFC741CF43}" />
            <Action XML_Guid="{C71E87CE-44D4-4A8C-9D8C-53B54AB5942A}">
                EventGhost.ShowOSD(u'X\xf0', u'0;-96;0;0;0;400;0;0;0;2;3;2;1;18;Webdings', (255, 255, 255), (0, 0, 0), 3, (32, 32), 0, 2.0, True)
            </Action>
        </Macro>
        <Macro Name="Show OSD: Mute ON" XML_Guid="{4F446602-BA9C-4859-90DD-9A688F58BF7B}">
            <Event Name="System.Mute" XML_Guid="{72C3C2BE-5B78-4281-A37F-74237C718F1D}" />
            <Action XML_Guid="{F0B99F56-04EC-4560-910C-81F1B072BE30}">
                EventGhost.ShowOSD(u'Xr', u'0;-96;0;0;0;400;0;0;0;2;3;2;1;18;Webdings', (255, 255, 255), (0, 0, 0), 3, (32, 32), 0, 0.0, True)
            </Action>
        </Macro>
    </Folder>
</EventGhost>

User avatar
kgschlosser
Site Admin
Posts: 5440
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc3 is out

Post by kgschlosser » Fri Jul 07, 2017 5:15 am

@bskchaos

I am not understanding what you are trying to do with those macros and the autorepeat
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc3 is out

Post by Luca Brasi » Fri Jul 07, 2017 6:03 am

Hi kgschlosser,
I got two more hickups since the install of rc3. One is with starting eg with windows and one is with kodi/xbmc-plugin. I guess it would be better to open their own bug reports and not bring it up here right?

[Edit:] The startup on boot has been solved by using NamedPipe.py from topix. Seems like "C:\Users\user\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\EventGhost.lnk" is affected by this too.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

someguy1
Posts: 34
Joined: Sun Mar 02, 2014 2:09 pm

Re: New version 0.5.0-rc3 is out

Post by someguy1 » Fri Jul 07, 2017 9:01 am

kgschlosser wrote:@someguy1

it's cool about not testing it before hand. you really had no reason to. all you did was give us the current information you had available to you. which works. and TY for going through the effort of back dating EG and testing it to see if it was there as well. that does help a lot. and you confirmed that it is there as well. because EG is so nested into the windows API windows could be doing something that is tied to a macro that you are running. so we want you to look at the process list and see where the spike is coming from and also because in that split second instance there are actually 2 EventGhost processes that are running as well. we would need to know which one is having a spike. narrows down where to look for a possible problems in the code. so I do thank you for the time you have put in to work through this problem and to also give us the information we needed to make the best possible code correction.

as far as the other code not working something could have happened when copy and pasting it. so I have attached the file just in case you wanted to give it a go.

I would be curious to know if there is any change in the CPU use between the 2. I wasn't sure if the use of regex would be more or less. it would probably be so tiny one way or the other it wouldn't be noticeable.
There is no change in CPU between this new code and the last one, not as far as I can see.

Regarding the two EG processes, the one that's always on gets a spike of just 1% most of the time, sometimes it goes up to max 3%. The other EG process is mostly 0% when it shows up, sometimes it jumps up to 4%.

Looking at the task manager graph I see a cpu spike of minimum 1% and maximum 9% every time i push a keyboard key for the hue plugin. Mostly around 2-4%. I exited all other programs before hand. But when I look at the list of the processes with the ordering of CPU usage I see only two other processes that use cpu when i push a hue keyboard button, they are MsMpEng.exe and Nissrv.exe. Both are related to Microsoft security essentials I believe, which I have installed. They each use 1% CPU for every button push.

Maybe as topix said it's just because I use Autohotkey to send events to EG that windows uses some cpu for the button pushes, using the remote for the same tasks gives no spike at all.

User avatar
kgschlosser
Site Admin
Posts: 5440
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc3 is out

Post by kgschlosser » Fri Jul 07, 2017 11:51 am

well I am going to assume that the hue are network attached devices. so any time you use the TCP stack to send something there is bound to be an increase. there is a whole lot of code it has to go through. the creation of the socket. passing through the firewall. things of that nature. But also when an event gets triggered it has to pass through 3 threads and because you are using the commandline it's actually 4 threads and 2 processes the event has to wiggle through. before it starts to process the macro so i am not a bit surprised the CPU moves at least a little.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5440
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc3 is out

Post by kgschlosser » Fri Jul 07, 2017 11:56 am

@Luca Brasi


the Named Pipe addition was a very large change to how EG starts up and how the command line parameters pass information between multiple instances of EG. so there was bound to be something that needed tweaking The restart in the dropdown doesn't work either. I have fixed that as well. and TY for testing it out for us. we already have the bug fixes in place. we decided to hold off for a few days before releasing RC4 that way we could put out a whole mess of fires at once. I am expecting that we will have RC4 out sometime this weekend or early next week.
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc3 is out

Post by Luca Brasi » Fri Jul 07, 2017 1:48 pm

no biggie man. I can live with the fixes. the thing with kodi, do you want me to post it here, in a separate bug thread or in the plugin's thread? Messages/actions from kodi don't appear in EG any more. Controlling kodi and json is fine though
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
kgschlosser
Site Admin
Posts: 5440
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc3 is out

Post by kgschlosser » Fri Jul 07, 2017 4:01 pm

are you getting any kind of an error??? and it worked fine with rc2?
If you like the work I have been doing then feel free to Image

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: New version 0.5.0-rc3 is out

Post by Luca Brasi » Fri Jul 07, 2017 4:09 pm

No error. Just no events for playing video or Screensaver activated and so on. and yes it was fine in Rc2. I use a lot for volume changes or letting kodi trigger the system standby
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

Post Reply