{"id":1728550,"user_name":null,"score":0,"text":"@somekind: \n> Chodzi og\u00f3lnie o to, \u017ceby by\u0142o intuicyjne, czyli np. \u017ceby nie musie\u0107 podawa\u0107 nazw w\u0142a\u015bciwo\u015bci w stringach.\nto pisa\u0142em pod kontrolke kt\u00f3ra jest i zwraca w\u0142a\u015bnie 3xstring[] - z czego 2 sa potrzebne\n\nsam my\u015bla\u0142em jak udekorowa\u0107 PropertyInfo[] aby mie\u0107 w tym wszystko zawarte, ale nie wymysli\u0142em niczego lepszego, a jak kontrolka juz co\u015b zwraca to tego uzy\u0142em.\n\n\n> A gdzie jest zysk z u\u017cycia async przy por\u00f3wnywaniu obiekt\u00f3w w pami\u0119ci?\n\nmo\u017ce jeszcze du\u017co nie rozumiem, ale to co chialem zrobi\u0107 to zr\u00f3wnolegli\u0107 proces, \nczyli jak rozumiem async\/await bardziej nadaje si\u0119 do proces\u00f3w I\/O bound? oczekujemy na odpowied\u017a, plik etc.?\na do cbu bound?\nbackground workers?\n\nprzepraszam, \u017ce si\u0119 tak dopytuje - ale mo\u017ce za g\u0142upi jestem - patrz\u0119 si\u0119 na takie co\u015b\nhttps:\/\/docs.microsoft.com\/en-us\/dotnet\/standard\/async-in-depth\n\ni mam taki tekst\n> async and await are the best practice for managing CPU-bound work when you need responsiveness. There are multiple patterns for using async with CPU-bound work. It's important to note that there is a small cost to using async and it's not recommended for tight loops. It's up to you to determine how you write your code around this new capability.\n\nok - mog\u0119 si\u0119 zgodzi\u0107, \u017ce nie rozumiem, \u017ale rozumiem, nie ograniam kontekstu itd tego co jest napisane - ale wydaje mi si\u0119, \u017ce je\u015bli jako zysk chce mie\u0107 responsywno\u015b\u0107 to chyba(?) jest to dobra droga\n\n**EDIT**\n\nznalaz\u0142em jeszcze takie co\u015b\n\n> Now CPU vs IO. IO is almost always handled outside the CPU proper and therefore can be run in parallel with the CPU work. Hence IO bound work is a good candidate for async operations. CPU bound work is a different story. If you have CPU heavy work and you move it to a task then you are now taxing the CPU more because you have the CPU task work and whatever work you're continuing to do. In a multi-core machine this is fine but on a single core processor you'll have to workloads fighting for the same CPU. Hence CPU bound work can be done in a task and many times it is fine you simply don't want to go over the # of cores available to the system. As a result you wouldn't want to create a bunch of CPU bound tasks that run at the same time. They'd just be fighting for CPU time. But having a CPU bound task, in general, is fine.\n\nczyli jak rozumiem najlepiej \u017ceby ewentualnie zr\u00f3wnolegla\u0142 to klient biblioteki, a nie sama biblioteka?\n\n\n**EDIT2**\nco\u015b znalaz\u0142em\nhttps:\/\/igorpopov.io\/2018\/06\/30\/asynchronous-programming-in-csharp\/\n\n> The essential information is this:\nI\/O-bound operations? - then await asynchronous I\/O methods provided by the .NET framework\nCPU bound operations? - then expose it as a synchronous\/plain implementation, the caller\/user of the operation will wrap it in a Task.Run if needed\n\nczyli - je\u015bli chcia\u0142bym cos zr\u00f3wnolegli\u0107 w bibliotece?\nto mog\u0119?","edit_count":3,"is_voted":null,"is_accepted":null,"is_subscribed":null,"user_id":110567,"deleter_name":null,"delete_reason":null,"orderingScore":0,"created_at":"2020-12-01T08:01:40+01:00","updated_at":"2020-12-01T08:51:05+01:00","deleted_at":null,"user":{"id":110567,"name":"mussel","is_online":false,"allow_sig":1,"allow_count":1,"allow_smilies":0,"posts":104,"visited_at":"2026-06-03T12:04:30.000000Z","created_at":"2020-11-30T14:25:13.000000Z","initials":"MU","is_verified":false,"is_deleted":false,"is_incognito":false,"is_blocked":false,"is_blocked_perm":false,"deleted_at":null,"photo":null},"html":"<p><a class=\"mention\" data-user-id=\"29040\" href=\"https:\/\/4programmers.net\/Profile\/29040\" rel=\"nofollow\">@somekind<\/a>:<\/p>\n<blockquote>\n<p>Chodzi og\u00f3lnie o to, \u017ceby by\u0142o intuicyjne, czyli np. \u017ceby nie musie\u0107 podawa\u0107 nazw w\u0142a\u015bciwo\u015bci w stringach.<br \/>\nto pisa\u0142em pod kontrolke kt\u00f3ra jest i zwraca w\u0142a\u015bnie 3xstring[] - z czego 2 sa potrzebne<\/p>\n<\/blockquote>\n<p>sam my\u015bla\u0142em jak udekorowa\u0107 PropertyInfo[] aby mie\u0107 w tym wszystko zawarte, ale nie wymysli\u0142em niczego lepszego, a jak kontrolka juz co\u015b zwraca to tego uzy\u0142em.<\/p>\n<blockquote>\n<p>A gdzie jest zysk z u\u017cycia async przy por\u00f3wnywaniu obiekt\u00f3w w pami\u0119ci?<\/p>\n<\/blockquote>\n<p>mo\u017ce jeszcze du\u017co nie rozumiem, ale to co chialem zrobi\u0107 to zr\u00f3wnolegli\u0107 proces,<br \/>\nczyli jak rozumiem async\/await bardziej nadaje si\u0119 do proces\u00f3w I\/O bound? oczekujemy na odpowied\u017a, plik etc.?<br \/>\na do cbu bound?<br \/>\nbackground workers?<\/p>\n<p>przepraszam, \u017ce si\u0119 tak dopytuje - ale mo\u017ce za g\u0142upi jestem - patrz\u0119 si\u0119 na takie co\u015b<br \/>\n<a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/standard\/async-in-depth\" rel=\"nofollow\" target=\"_blank\">https:\/\/docs.microsoft.com\/en-us\/dotnet\/standard\/async-in-depth<\/a><\/p>\n<p>i mam taki tekst<\/p>\n<blockquote>\n<p>async and await are the best practice for managing CPU-bound work when you need responsiveness. There are multiple patterns for using async with CPU-bound work. It's important to note that there is a small cost to using async and it's not recommended for tight loops. It's up to you to determine how you write your code around this new capability.<\/p>\n<\/blockquote>\n<p>ok - mog\u0119 si\u0119 zgodzi\u0107, \u017ce nie rozumiem, \u017ale rozumiem, nie ograniam kontekstu itd tego co jest napisane - ale wydaje mi si\u0119, \u017ce je\u015bli jako zysk chce mie\u0107 responsywno\u015b\u0107 to chyba(?) jest to dobra droga<\/p>\n<p><strong>EDIT<\/strong><\/p>\n<p>znalaz\u0142em jeszcze takie co\u015b<\/p>\n<blockquote>\n<p>Now CPU vs IO. IO is almost always handled outside the CPU proper and therefore can be run in parallel with the CPU work. Hence IO bound work is a good candidate for async operations. CPU bound work is a different story. If you have CPU heavy work and you move it to a task then you are now taxing the CPU more because you have the CPU task work and whatever work you're continuing to do. In a multi-core machine this is fine but on a single core processor you'll have to workloads fighting for the same CPU. Hence CPU bound work can be done in a task and many times it is fine you simply don't want to go over the # of cores available to the system. As a result you wouldn't want to create a bunch of CPU bound tasks that run at the same time. They'd just be fighting for CPU time. But having a CPU bound task, in general, is fine.<\/p>\n<\/blockquote>\n<p>czyli jak rozumiem najlepiej \u017ceby ewentualnie zr\u00f3wnolegla\u0142 to klient biblioteki, a nie sama biblioteka?<\/p>\n<p><strong>EDIT2<\/strong><br \/>\nco\u015b znalaz\u0142em<br \/>\n<a href=\"https:\/\/igorpopov.io\/2018\/06\/30\/asynchronous-programming-in-csharp\/\" rel=\"nofollow\" target=\"_blank\">https:\/\/igorpopov.io\/2018\/06\/30\/asynchronous-programming-in-csharp\/<\/a><\/p>\n<blockquote>\n<p>The essential information is this:<br \/>\nI\/O-bound operations? - then await asynchronous I\/O methods provided by the .NET framework<br \/>\nCPU bound operations? - then expose it as a synchronous\/plain implementation, the caller\/user of the operation will wrap it in a Task.Run if needed<\/p>\n<\/blockquote>\n<p>czyli - je\u015bli chcia\u0142bym cos zr\u00f3wnolegli\u0107 w bibliotece?<br \/>\nto mog\u0119?<\/p>\n","url":"http:\/\/static.175.128.202.116.clients.your-server.de\/Forum\/Oceny_i_recenzje\/346763-properties_comparator_prosba_o_kostruktywna_krytyke?p=1728550#id1728550","is_locked":false,"editor":{"id":110567,"name":"mussel","is_online":false,"allow_sig":1,"allow_count":1,"allow_smilies":0,"posts":104,"visited_at":"2026-06-03T12:04:30.000000Z","created_at":"2020-11-30T14:25:13.000000Z","initials":"MU","is_verified":false,"is_deleted":false,"is_incognito":false,"is_blocked":false,"is_blocked_perm":false,"deleted_at":null,"photo":null},"permissions":{"write":false,"delete":false,"update":false,"accept":false},"moderatorPermissions":{"delete":false,"update":false,"accept":false,"merge":false,"sticky":false,"admAccess":false},"comments":[],"comments_count":0,"assets":[],"metadata":"eyJpdiI6ImtrWXdsVlplanNJd29yUE55RWVxTEE9PSIsInZhbHVlIjoiSGlqL1lCY3NIZmZJdzZlV2tQbkZVTjdkRmpva2Q4UCtiTGhrT2FnWFRreUZ5d3YrWjJwMHlTZkVudWRZanJVVkRmUW9MUHVvSXNrOU9ZR2pGWjlqYTYwNDN3cGI4ek1US0FCWGJ3bjRTM0RCdU1ONkxWbW1WRjMvTi8reDdkVEkiLCJtYWMiOiJjZjY5NDlhOTQ0ZjUxOWJiZmM4MTNlOTVlMTM5MDA1YmU0MWVkZWYxZDA0MzNiZWY3ZjA5ZThjNDk1MWZiMzVlIiwidGFnIjoiIn0=","has_review":false,"review_style":"info","parentPostId":null,"childrenFolded":false,"type":"regular","highlighted":false}