Re: processor time allocation
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Wed, 30 Mar 2005 19:31:46 -0800
Do you happen to update UI in OnIdle function? It's a wrong place.
"RossD @ Cadwell" <RossDCadwell@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F0A4B049-FCED-4745-9DE6-347B35F05847@xxxxxxxxxxxxxxxx
> Wow! Fix it! Really? Why didn't I think of that?
>
> How about Microsoft fixing its task manager? This isn't the first time
> I've
> had problems with threads and the task manager. The last time Microsoft
> admitted that they had heard of my problem before but that they didn't
> know
> why it would be happening.
>
>
> "Alexander Grigoriev" wrote:
>
>> If the CPU load is not 100%, your app gets all CPU time it can use. If
>> your
>> app is not able to use all the CPU power, fix it.
>>
>> OnIdle() MFC function is called after the message loop has handled all
>> the
>> messages in the queue. It doesn't mean the system is or is not idle.
>>
>>
>> "RossD @ Cadwell" <RossDCadwell@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
>> message
>> news:998F6DF7-89D1-4A27-B3DE-A2DADA8F33E7@xxxxxxxxxxxxxxxx
>> > If my app is getting all of the processor time that it requires, then
>> > why
>> > is
>> > the MFC idle function rarely running, why are all of the UI updates not
>> > occurring or occurring at very slow rates, why are my worker threads
>> > (which
>> > do all of the heavy processing) falling behind?
>> >
>> > My UI thread does nothing other than update the UI and accept user
>> > input,
>> > and yet it can't get processor time to even do that.
>> >
>> > And yet the operating system refuses to give my app more than 30 % of
>> > the
>> > available CPU time.
>> >
>> > Also note that I have implemented Michael's suggestion, and although it
>> > makes my 20 Hz thread run more smoothly, it does nothing to alleviate
>> > my
>> > real
>> > problem which I stated up front - although in different words.
>> >
>> > How do I get the operating system to allocate more CPU time to my app?
>> >
>> > "Mark Randall" wrote:
>> >
>> >> It was simply a comment that the task manager does not always say what
>> >> you
>> >> think its saying.
>> >>
>> >> If the CPU isnt maxed out (100% processor) than your application is
>> >> getting
>> >> all the processing power it needs.
>> >>
>> >> - Mark R
>> >>
>> >>
>> >> "RossD @ Cadwell" <RossDCadwell@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>> >> > Did you have any thoughts on how to balance out my thread's CPU
>> >> > allocation?
>> >> > Or could you be more specific with your comments if they were
>> >> > intended
>> >> > to
>> >> > imply a solution?
>> >> >
>> >> > thanks
>> >> >
>> >> > "Mark Randall" wrote:
>> >> >
>> >> >> Its the percentage of the total usage shown I believe.
>> >> >>
>> >> >> Knocking out the sleep would just make it a huge great big loop
>> >> >> would
>> >> >> it
>> >> >> not?
>> >> >>
>> >> >> - Mark R
>> >>
>> >>
>> >>
>>
>>
>>
.
- References:
- Re: processor time allocation
- From: RossD @ Cadwell
- Re: processor time allocation
- Prev by Date: Re: Some sharing violation problem
- Next by Date: Re: CAsyncSocket and performance issues
- Previous by thread: Re: processor time allocation
- Next by thread: Re: processor time allocation
- Index(es):
Relevant Pages
|