« first day (3842 days earlier)      last day (1098 days later) » 

2:22 AM
hi
 
 
1 hour later…
3:52 AM
Hi
 
mr5
4:26 AM
watch this before you sleep
 
5:33 AM
@mr5 Sorry, I watched this after sleep.
 
@Bassem I think you can see that in Resource Monitor, just look at the threads by w3c processes.
@Wietlol Why +1? Wouldn't you set it to -1 to use all that you can but leave one free for management?
Wouldn't +1 just make the CPU swap more threads than necessary?
 
5:52 AM
Hi, Anyone worked with Navisworks clash detective APIs?
 
 
1 hour later…
6:57 AM
@Squirrelkiller iirc, the idea was that there is always one thread in queue to get to the front of the queue
@Bassem missing an await somewhere...
 
mr5
any of you aware of this event?
 
Yup
To find the one true Josh
 
Is DataTable value type?
I have an instance dt, I pass it to a methodX(dt), make manipulation in dt. But outside method dt has still 0 value
I am going to try "ref" now
 
no
 
DataTable is absolutely a refrence type
Also LPT: Don't use DataTables
Unless of course you need to to stuff it into an actual table in the view
 
7:43 AM
my project uses it
how different we all are :(
 
Oh our project uses it too, but only because a team providing data to us provides it as a DataTable :/
Another Team did too but we made the upgrade to DTOs
The problem with DataTables is that it's not that easy to see what type a column is
Got a List<Person>? I can just jump to Person and check the properties.
DataTable? Not so much.
 
8:14 AM
yes!
 
 
2 hours later…
10:05 AM
@Squirrelkiller you mean w3wp.exe
 
@Bassem Ah yes lol
 
Thanks man
How I know if the number is good according to my processor
I have Xeon 8124M CPU 3 GHZ (4 CPUs)
Threads are appearing 49
CPU 80
and also 49 Threads , means there is 49 item in the parallel.foreach ?
 
No, means there is 49 threads doing work. There is 1) Threads that spin up and manage the IIS itself (somebody's gotta decide what requests to send to which application, right?) 2) at least one thread managing the Parallel.ForEach (the thread doing a unit of work can't be the same one that manages all the worker threads, right?) 3) threads according to options.MaxParallel working the items
And maybe some more I can't think of right now
Like, start a single threaded console application and ask the resource manager how many threads that process has. It's probably not gonna be 1.
 
can you help me and advice me in order to get the best performance
I tried to search but i can't figure it out
      // results is 1 Million
                List<NewProperty> results = Operations.GetFullList(id, _connectionToEs);

                //chunks is 1 Million/5 , list of lists
                List<List<NewProperty>> chunks = Operations.SplitList(results, 5);

                Parallel.ForEach(chunks, (chunk) =>
                {
                    ProcessResponse(chunk, id, proxyIndexInt);
                });
 
Just tried it: I have an asp.net core aplication, which is the backend for a client I built. When I run that without any requests, it runs 3 threads.
 
10:16 AM
1- If i set MaxParallel , How this will affect performance
2- for parallel foreach , is it better to make it like this or should be different sizing
 
@Bassem Define performance. Do you want it done as fast as possible, therefore using as much CPU power at once as possible?
Also is it all CPU-bound work or is there IO-work too?
 
you mean Input / output operations ?
 
Yes, like file or network operations
CPU only: Make as many threads as your CPU can handle at once.
IO: Make it async and don't care about the number of threads.
 
I just do the following
1- call API
2-save response to elastic search

- call api for single request on post man took 200 ms
- save response to elastic took about 40 ms
 
Ah so two IO operations
 
10:18 AM
but it is read automatically from the data
user do nothing
 
I have no idea what a user has to do with this
 
by saying IO , you mean user interact through UI ?
 
1) application reads data from API
2) application saves data to elastic search (webservice, right?)
 
yes
 
By IO I mean your application reads a file or writes to a file or a database or via a network
Calling a webservice is IO work
 
10:20 AM
so it is IO in this case
 
Means, your CPU starts the call, then has to wait until the server responds
 
yes but each record is standalone
 
For many IO calls, PLINQ is the most helpful I heard
 
i have million records and want them to run in parallel
 
Yeah PLINQ is made for that basically
 
10:21 AM
so Parallel.Foreach is correct for this situation or not
 Parallel.ForEach(chunks, (chunk) =>
                {
                    ProcessResponse(chunk);
                });
 
Goes something like unitsOfWork.AsParallel().Select(unit => { var data = unit.Execute(); elastic.Add(data); });
Parallel.ForEach is not ideal for this, it's basically "here I will spread this work over X threads" - but you don't really care about threads here, as the IO work would make your threads just wait and do nothing.
You want async here
 
if i make the code inside ProcessResponse(chunk); asyc
would it help ?
 
That is what you want
@Bassem Yes
All IO calls should be async anyway
Android compiler will even throw it in your face if you don't
 
ok Thank you for your help i would like to highlight last things
currently with this situation , it tooks around 5 hours to process 1 million records
how can i know if this time is good
or not
 
No idea
 
10:27 AM
because you know may be i am trying to enhance the performance but this is the best performance that my cpu can provide
 
You could however make a test set of 1000 records, process that usign different methods (Parallel.ForEach, PLINQ), and compare the result times.
In general, PLINQ will decide for you how many threads make sense to use at once
 
@Squirrelkiller ok Thanks for the useful information , I will check
 
Would love to see the results, am curious
 
:)
sure i will let you know
 
mr5
or give us a bigger picture of what you are trying to achieve?
it looks to me you are trying to do local computation and transfer data over another computer
 
10:38 AM
Looks like indexing to me
 
11:14 AM
blahhh found out my bootstrap accordion works perfect on desktop, but if it gets too big on iOS, it freaks out? idfk
 
@mr5
I am calling usps API
on huge records
and take the response , save it to elastic
 
mr5
is this a one time processing thing?
does it get called often or a scheduled process?
 
mr5
11:57 AM
I'm looking for JSON Path library for System.Text.Json and was wondering if anyone has any recommendations.
 
mr5
12:15 PM
oof that's a draft xD
it's red day for crypto
 
@mr5 wym?
 
mr5
@Freerey look at the market. every top crypto is red
 
lol nice
time to take money out
wow ETH went down $104 just as I was boasting to someone about my earnings yesterday
 
mr5
are all your eth came from mining?
 
yes
 
mr5
12:41 PM
using your asic machine?
 
lol "asic"
I've stopped mining for now cause it's too warm but yes
 
mr5
does your mining add to your monthly billing?
 
ofc, but the eth covered the cost
 
mr5
I'm guessing it already paid off your investment?
 
nah but it's like I said like 5x here already...I got this for more than mining
 
mr5
12:50 PM
how much is the electric bill increase when you mine for the whole month?
 
not a noticeable amount
somehow the most money I'm spending on electricity is going into the kitchen
 
mr5
oic
why would you pull it out when you made no investment
 
Hello. Is there any difference between [Serializable] and [Serializable()] ?
 
mr5
no
but it's preferable to use the former
you only use the invocation syntax when you're actually supplying a parameter
 
 
2 hours later…
2:41 PM
Hello. I have in Consumer class a Field associated with a Dependency Property of Type MyCollection : ObservableCollection<MyItem>. In MyItem I even implemented ISerializable and its GetObjectData function override.
I marked both My classes with the [Serializable] attribute. But i am start to freaking out why some other Dependency Properties of Consumer object are getting serialized into the file and the MyCollection field is not getting there.
 
3:25 PM
 
 
4 hours later…
7:00 PM
Anyone know why visual studio might just say "fuck it" when I try and get further information from an exception?
 

« first day (3842 days earlier)      last day (1098 days later) »