Work in Progress - Developer Area

  Thread Rating:
  • 4 Votes - 4.25 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #256
Found a major problem with the bwWorkers on main thread and the Await/Async... working on a Solution Smile

Slowly advancing!

If you think I'm useful please use the +/- button to raise my reputation
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #257
Ok guys this will be a full revolution Smile
http://blogs.msdn.com/b/dotnet/archive/2...-apis.aspx

we can remove all bwWorkers and make code 1000000000000000 simplier BUT will require still some job

some good reading:
http://msdn.microsoft.com/en-us/library/...eteExample


get ready for AA (async and await) version of Ember Tongue

If you think I'm useful please use the +/- button to raise my reputation
(This post was last modified: 2014-12-13 18:29 by m.savazzi.)
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #258
Guys,
who is the one that generated tens (hundreds?!?) of Private Sub mnuMovieSetMarkAskEFanarts_Click Confused

that is not a good practice... is a very bad one.

All menu of the same "family" should have the same handler procedure and pass an ID to switch between them the ID should be stored in the Tag field of the control.

The code is 100000000000000000000000000000000000000000 times more efficient and easier to maintain.

bhoooooooooooooooooooooo

exact number is 245 menu procedures ] 45 existing!!!! Ouch!

Smile

If you think I'm useful please use the +/- button to raise my reputation
(This post was last modified: 2014-12-13 20:33 by m.savazzi.)
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #259
Work is continuing - removing all background workers as explain in MSDN best practices.

In this round I will remove all backgroundworkers then I will add the global cancellation as well as the progress management as explained in the article I found and posted.

If you think I'm useful please use the +/- button to raise my reputation
find quote
DanCooper Offline
Moderator
Posts: 1,654
Joined: Apr 2012
Reputation: 79
Location: Switzerland
Post: #260
Do you have synced our latest commits with your fork? :-)

German Ember-MM Support

Latest Ember-MM - [Release] Ember Media Manager 1.3.x
Latest Ember-MM - [Beta] Ember Media Manager 1.4.x
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #261
I cannot sync the two Forks...

once my is working enough I will push it to you Smile

If you think I'm useful please use the +/- button to raise my reputation
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #262
advancing quite quickly to bw removal Smile they are all in the main form.

Once that is done I think I can push the changes so you can harmonize the soruces...

1) after that I will have to add the correct global cancel for awaited procedures AND the visual feedback for the ones that need it
2) after that I will rework the file operations to be async and awaitable
3) after that I will update ALL the scrapers to use the correct awaitable libraries (as wrote in previous posts) and get rid of C# code

If you think I'm useful please use the +/- button to raise my reputation
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #263
I think we had a lot of useless bw.... there are no time consuming or resource consuming tasks...
will have even to check the timers... we have a lot of them

Funny bwMovieSetInfo does not have a body (DoWork) so is useless...

If you think I'm useful please use the +/- button to raise my reputation
(This post was last modified: 2014-12-14 13:11 by m.savazzi.)
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #264
I have left in the code A LOT of comments to allow an easier merge of code and for everyone to more easily understand what happened, and because some of the code (progress update) may be usefull in step 1)
After the three steps above I will remove all commented lines Smile

If you think I'm useful please use the +/- button to raise my reputation
find quote
DanCooper Offline
Moderator
Posts: 1,654
Joined: Apr 2012
Reputation: 79
Location: Switzerland
Post: #265
(2014-12-14 13:10)m.savazzi Wrote:  Funny bwMovieSetInfo does not have a body (DoWork) so is useless...

Copy-Paste error ;-)

MovieSets don't have MetaData, so you can remove the bw and the "doMI" part in "Private Sub LoadMovieSetInfo".

German Ember-MM Support

Latest Ember-MM - [Release] Ember Media Manager 1.3.x
Latest Ember-MM - [Beta] Ember Media Manager 1.4.x
find quote
DanCooper Offline
Moderator
Posts: 1,654
Joined: Apr 2012
Reputation: 79
Location: Switzerland
Post: #266
(2014-12-13 20:27)m.savazzi Wrote:  Guys,
who is the one that generated tens (hundreds?!?) of Private Sub mnuMovieSetMarkAskEFanarts_Click Confused

that is not a good practice... is a very bad one.

All menu of the same "family" should have the same handler procedure and pass an ID to switch between them the ID should be stored in the Tag field of the control.

The code is 100000000000000000000000000000000000000000 times more efficient and easier to maintain.

bhoooooooooooooooooooooo

exact number is 245 menu procedures ] 45 existing!!!! Ouch!

Smile

(2014-12-14 12:54)m.savazzi Wrote:  advancing quite quickly to bw removal Smile they are all in the main form.

Once that is done I think I can push the changes so you can harmonize the soruces...

1) after that I will have to add the correct global cancel for awaited procedures AND the visual feedback for the ones that need it
2) after that I will rework the file operations to be async and awaitable
3) after that I will update ALL the scrapers to use the correct awaitable libraries (as wrote in previous posts) and get rid of C# code

Please change only Await/Async relevant things, otherwise it will be a mess to merge your changes with the master branch.

German Ember-MM Support

Latest Ember-MM - [Release] Ember Media Manager 1.3.x
Latest Ember-MM - [Beta] Ember Media Manager 1.4.x
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #267
(2014-12-16 09:29)DanCooper Wrote:  
(2014-12-13 20:27)m.savazzi Wrote:  Guys,
who is the one that generated tens (hundreds?!?) of Private Sub mnuMovieSetMarkAskEFanarts_Click Confused

that is not a good practice... is a very bad one.

All menu of the same "family" should have the same handler procedure and pass an ID to switch between them the ID should be stored in the Tag field of the control.

The code is 100000000000000000000000000000000000000000 times more efficient and easier to maintain.

bhoooooooooooooooooooooo

exact number is 245 menu procedures ] 45 existing!!!! Ouch!

Smile

(2014-12-14 12:54)m.savazzi Wrote:  advancing quite quickly to bw removal Smile they are all in the main form.

Once that is done I think I can push the changes so you can harmonize the soruces...

1) after that I will have to add the correct global cancel for awaited procedures AND the visual feedback for the ones that need it
2) after that I will rework the file operations to be async and awaitable
3) after that I will update ALL the scrapers to use the correct awaitable libraries (as wrote in previous posts) and get rid of C# code

Please change only Await/Async relevant things, otherwise it will be a mess to merge your changes with the master branch.

Yessssss Smile do not worry!

It will be already quite challenging like this. I'm commenting and not deleting and not optimizing the code.
That will be point 4)

I should be almost there...

M

If you think I'm useful please use the +/- button to raise my reputation
find quote
m.savazzi Offline
Moderator
Posts: 929
Joined: Mar 2008
Reputation: 29
Post: #268
Pushed first release to Dan's repository!!!

The fun will begin!

look at this: http://msdn.microsoft.com/en-us/library/hh696703.aspx
will add it to images and other heavy download sections

http://blogs.msdn.com/b/pfxteam/archive/...93335.aspx
http://blogs.msdn.com/b/pfxteam/archive/...35962.aspx
http://blogs.msdn.com/b/pfxteam/archive/...77034.aspx

If you think I'm useful please use the +/- button to raise my reputation
(This post was last modified: 2014-12-20 17:54 by m.savazzi.)
find quote
Post Reply