Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
jotalanusse
Posts
Comments
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
Not late at all! Thank you very much for the example implementation, I will check it out
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
Got it, well the only thing left to do is to try all these things a find the one that better fits my needs. Thanks!
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
My problem is that arrays are constantly being sub-divided into smaller ones
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
For what I have been testing, right now using
FileStream
to directly read the data is out of the question, it is by far the slowest method
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
But I know I never exceed 100Kb for example
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
Pretty small, the chunks of data I read are on average 10KB (I have not tested this, it's just a guess)
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
I benefit more by having a 100MB file in memory than having to wait for the I/O when I decide to do
FileStream.Read()
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
?
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
But wouldn't using
Memory<byte>
be better as it allows me to have just one copy of the data at all times?
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
I'm not familiar with
ArrayPool.Shared
, but doesn't it allocatee new memory every time I pass an array?
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
Okay, I'll look further into what you said, thanks! I'm going to ask for some help on #advanced as well then
39 replies
C
C#
•
Created by jotalanusse on 11/17/2023 in
#help
Processing files as fast as possible
What do you mean by peek? I know that I could use
Memory<byte>
or
ReadOnlyMemory<byte>
as a way of storing the file data, so I can create references to it without copying it. But can this be done as well with
MemoryStream
s?
39 replies