Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Well done .NET!...

Well done .NET!...

Scheduled Pinned Locked Moved The Lounge
csharpcollaborationjsonperformancehelp
26 Posts 14 Posters 34 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B BruceCarson

    Do people actually use that cruft (Silverlight)?

    T Offline
    T Offline
    ToddHileHoffer
    wrote on last edited by
    #16

    No. It is used to play videos on web pages. That is about it.

    I didn't get any requirements for the signature

    1 Reply Last reply
    0
    • W wout de zeeuw

      What I always do is this to not serialize event handlers (but not sure if this is what you were looking for):

          \[field: NonSerialized\]
          public event EventHandler Modified;
      

      Wout

      S Offline
      S Offline
      Super Lloyd
      wrote on last edited by
      #17

      Doing that you control the serialization of your classes. But in my case I want to drop delegate from 3rd party data structure! I can't tag their code! ;)

      A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

      1 Reply Last reply
      0
      • S Super Lloyd

        For my own pet project to take over the world in my spare time, I was, this week, rewriting a BinarySerializer from scratch. Almost there, only "the Deserializer left to do". I'm caching dynamically generated method to access all field, I did a good encoding. In my little serializing (only so far) tests I was 20% smaller than the .NET default serialization! :-) Out of curiosity I just did a speed test... Ho man... The build in .NET serialization is .... 12 times faster! :sigh: (i.e. what I do in 12 seconds, they do in just 1, just be unambiguously clear). How could they do that! It's so unfair! :omg: Ho well I will just go with the default serialization and try to work around the little issue it has... And... well done the .NET team! :cool:

        A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

        J Offline
        J Offline
        Jim Matthews
        wrote on last edited by
        #18

        welcome to the bizzaro lounge. :cool:


        jim

        1 Reply Last reply
        0
        • S Super Lloyd

          For my own pet project to take over the world in my spare time, I was, this week, rewriting a BinarySerializer from scratch. Almost there, only "the Deserializer left to do". I'm caching dynamically generated method to access all field, I did a good encoding. In my little serializing (only so far) tests I was 20% smaller than the .NET default serialization! :-) Out of curiosity I just did a speed test... Ho man... The build in .NET serialization is .... 12 times faster! :sigh: (i.e. what I do in 12 seconds, they do in just 1, just be unambiguously clear). How could they do that! It's so unfair! :omg: Ho well I will just go with the default serialization and try to work around the little issue it has... And... well done the .NET team! :cool:

          A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

          N Offline
          N Offline
          Nemanja Trifunovic
          wrote on last edited by
          #19

          Super Lloyd wrote:

          How could they do that! It's so unfair!

          Run ILDasm and find out how they did it :)

          Programming Blog utf8-cpp

          S 1 Reply Last reply
          0
          • S Super Lloyd

            For my own pet project to take over the world in my spare time, I was, this week, rewriting a BinarySerializer from scratch. Almost there, only "the Deserializer left to do". I'm caching dynamically generated method to access all field, I did a good encoding. In my little serializing (only so far) tests I was 20% smaller than the .NET default serialization! :-) Out of curiosity I just did a speed test... Ho man... The build in .NET serialization is .... 12 times faster! :sigh: (i.e. what I do in 12 seconds, they do in just 1, just be unambiguously clear). How could they do that! It's so unfair! :omg: Ho well I will just go with the default serialization and try to work around the little issue it has... And... well done the .NET team! :cool:

            A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

            E Offline
            E Offline
            Ennis Ray Lynch Jr
            wrote on last edited by
            #20

            Are you using c++ and memory mapped IO?

            Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

            S 1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              Super Lloyd wrote:

              I'd like to know how come they do that so fast

              Do you really think .NET is written in .NET? Or the (much faster) native code? :laugh:

              No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

              O Offline
              O Offline
              originSH
              wrote on last edited by
              #21

              Native code is generally a bit faster, but not massive amounts. It also depends alot on what you're doing, there are situations where managed code can be faster than native oweing to the optimisation at runtime that can be smart and machine specific. Also if you go the whole hog and make everything managed then you can do stuff like disabling hardware memory protection which can yield massive performance increases. Of course these are currently limited to research OSs like singularity and midori. And yes, the vast majority of .Net is written in .Net :P

              1 Reply Last reply
              0
              • S Super Lloyd

                Well, most .NET is written in .NET! (Except some very low level building block..) But anyway, from a quick look in Reflector, it looks like the .NET Serialization in indeed written mostly in .NET (and use heaps of classes!)

                A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                R Offline
                R Offline
                Rajesh R Subramanian
                wrote on last edited by
                #22

                Super Lloyd wrote:

                from a quick look in Reflector, it looks like the .NET Serialization in indeed written mostly in .NET

                And was that written in .NET or C++? Stop being silly and just accept it. My compiler compiled your compiler.

                It is a crappy thing, but it's life -^ Carlo Pallini

                1 Reply Last reply
                0
                • S Super Lloyd

                  I'm not at the point where I could make an informed statement (for my pet project in my spare time to take over the world), however all the data would be saved by using serialization (not the whole data at once, mind you, just chunks of it. but all of it in chunk). Hence I guess the faster the better to provide a snazzy user experience. A x10 speed difference is a clear no brainer!

                  A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                  D Offline
                  D Offline
                  Dave Parker
                  wrote on last edited by
                  #23

                  Yeah well kinda depends on how much you're serializing I guess as to whether its an issue or not. Whenever I've serialized / deserialized its seemed instaneous - less than 0.1 of a second anyway even for a fair amount of data on a mobile device. But if its a lot of data and/or being done very regularly then I guess speed is more important. I have some stats somewhere at work from when I did some speed tests on something that, as part of what it did, serialized 2 objects for the purpose of comparing them. I think it was using the built-in binary serialization. I can't remember exactly how fast it was but it could run thousands of times per second if not a lot more. In my case I was running it on every key press to determine whether the data had changed from the original in order to gray out / re-enable a save button based on whether the record was dirty. I'd be more worried about memory usage due to temporary objects being created and hanging around until garbage collected but it never became an issue anyway.

                  1 Reply Last reply
                  0
                  • E Ennis Ray Lynch Jr

                    Are you using c++ and memory mapped IO?

                    Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                    S Offline
                    S Offline
                    Super Lloyd
                    wrote on last edited by
                    #24

                    I'm using C# and MemoryStream! ;-)

                    A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                    1 Reply Last reply
                    0
                    • N Nemanja Trifunovic

                      Super Lloyd wrote:

                      How could they do that! It's so unfair!

                      Run ILDasm and find out how they did it :)

                      Programming Blog utf8-cpp

                      S Offline
                      S Offline
                      Super Lloyd
                      wrote on last edited by
                      #25

                      Yep I have to do that... Although I might use Reflector[^] instead! But I already had a glance and they use so many classes! Ha well, I guess nothings comes easily... :-D

                      A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                      1 Reply Last reply
                      0
                      • OriginalGriffO OriginalGriff

                        Super Lloyd wrote:

                        I'd like to know how come they do that so fast

                        Do you really think .NET is written in .NET? Or the (much faster) native code? :laugh:

                        No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones

                        M Offline
                        M Offline
                        Mark_Wallace
                        wrote on last edited by
                        #26

                        OriginalGriff wrote:

                        Do you really think .NET is written in .NET?

                        If you dig deep enough, you find the underlying COBOL commands.

                        I wanna be a eunuchs developer! Pass me a bread knife!

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups