sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Information in the dictionary = huge filesize

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 5 Posters 637 Views 5 Watching
    Loading More Posts
    • 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.
    • P Offline
      Pout
      last edited by

      When adding information in the dictionary of Sketchup entities the filesize is growing very fast.
      I have added information to all entities of a 25Mb model and this results in a 75Mb model...

      Does Su not handle well that information or is this normal?

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        Depends how much info your adding, but 50mb certainly sounds a lot.

        Any more details on what your doing?

        http://remusrendering.wordpress.com/

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          What data and how many entities?

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • P Offline
            Pout
            last edited by

            the amount of entities is alot: 350K
            the data is simple:
            the name of the original color of the entity (like listed in the materials list)
            and one other short piece of text

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              Sounds like a bug. I don't think it should be so much. Perhaps an issue with the code where you add the text once to the first entitiry, twice tot he second, three times to the third, etc?

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                Got a sample model and code snippet?

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • AdamBA Offline
                  AdamB
                  last edited by

                  Sounds completely reasonable to me.

                  Filesize increase is 50000000
                  Number of entities 350000

                  So each dictionary entry is 142 bytes which is completely believable.

                  Developer of LightUp Click for website

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    In the SKP file format each attribute is stored in a UTF-16 datablock which adds extra overhead for each attribute.

                    Thomas Thomassen β€” SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      Pout
                      last edited by

                      i don't think there is a bug since i can easily read the data from the dictionary.
                      I don't have a example at hand (since they are all way to big)
                      But this is what is added to each entity :

                      e.set_attribute 'libraryname', 'suid', variable (number)
                      e.set_attribute 'libraryname', 'mat_or', name of the original material (text)
                      when a face;
                      e.set_attribute 'libraryname', 'matback_or', name of the original material (text)
                      e.set_attribute 'libraryname', 'typestatus', name of a material (text)
                      
                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post
                      Buy SketchPlus
                      Buy SUbD
                      Buy WrapR
                      Buy eBook
                      Buy Modelur
                      Buy Vertex Tools
                      Buy SketchCuisine
                      Buy FormFonts

                      Advertisement