Ridiculously huge schematic file size - Page 1
Forum section: electronics / general

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 26, 2015, 08:03:51 am
content: I have a schematic file which contains two opamps, a few resistors and capacitors, a few text labels and text boxes, some input-output ports, a bus and a 3kb embedded PNG image, whose screen shot is seen below.This file consumes 18.9MB disk space. It takes very long time to save and it takes forever to open! It looks like most of this 18.9MB is balloon, because I was able to compress this schematic file and the image file into a 122kb ZIP (31kb RAR) archive and attached it under this post. Altium runs very slowly and consumes too much CPU because of this.Do you have any idea what inflates this file and how do I prevent it?

author: GK
author_rank: Super Contributor
timestamp: March 26, 2015, 08:37:24 am
content: Click that icon with the downward facing arrow on the top left hand corner (next to "file"). Then "design utilities"...... "compact design.......browse". Also click the check box to "Perform Compact after closing design" for no more problems.

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 26, 2015, 03:34:41 pm
content: Quote from: GK on March 26, 2015, 08:37:24 amThere is no "downward facing arrow" on the top left of my screen near the "File" menu.I googled for "design utilities" and "compact design" along with the keyword "altium", but couldn't find anything. I searched for "perform compact after closing design" and it found results for Protel 99. I'm using Altium Designer 2015. I don't think your solution applies to my Altium version.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 26, 2015, 03:52:49 pm
content: Well then don't put it in there!It might be possible to copy and paste it as a metafile (e.g., if it was prepared in Word's math plugin).But mainly, I have to say... WTF? Supporting data like that belongs in a separate description document, not the schematic. The schematic should be about only the electrical circuit itself.Tim

author: Batang
author_rank: Regular Contributor
timestamp: March 26, 2015, 04:02:26 pm
content: I downloaded the file and opened it AD15 and yikes it took some time to load.Firstly it is not because of the image, I striped the circuit until I was left with C23 and saving the file resulted in a file size of 6.06 MB (6,356,480 bytes)I then added another capacitor from my standard library and the size is 6.06 MB (6,361,088 bytes).Copying the components in your sheet to a new sheet caused the file size to grow to a crazy size.I can only conclude that you have a problem with the components in your library.Cheers

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 26, 2015, 04:05:50 pm
content: I know close to nothing about altium, but your file is filled for 98% by only the characters 8E (65%) and C2 (33%)Clearly not the most effective way to store something

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 27, 2015, 07:48:59 am
content: I solved the problem by doing the following steps.1. Created a dummy schematics file.2. Copied everything to it. (CTRL+A --> CTRL+C --> CTRL+P --> CTRL+S)3. Observed that size of this new file is even grater (~34MB) than the original one.4. Started to delete components one by one, saving the file and checking the file size after each one.5. I saw that the file size greatly reduces after deleting capacitors.6. Deleted every capacitor and the resulting file size was only ~250kb.7. Returned to the original file. Deleted all old capacitors. Put new ones (without making change on my custom capacitor library).8. Final file size is 517kb which is quite normal. The issue is fixed.I don't know what caused this. I copy/pasted all 10nF and 100nF capacitors from a single one. Either the copy/paste operation avalanched garbage data in the component, or the very original capacitor was somehow corrupted.The new file and the capacitor schematic library are attached.

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 27, 2015, 07:52:14 am
content: Quote from: PA0PBZ on March 26, 2015, 04:05:50 pmCan you name this software? It looks interesting.

author: PA0PBZ
author_rank: Super Contributor
timestamp: March 27, 2015, 08:26:49 am
content: It is a built in function of the HEX editor I use, Hex Workshop.http://www.hexworkshop.com/overview.html

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 27, 2015, 08:29:34 am
content: Hex Workshop looks changed a lot. I used to use it until I met Notepad++ and its Hexadecimal Editor add-on.

author: AlfBaz
author_rank: Super Contributor
timestamp: March 27, 2015, 09:33:27 am
content: It would appear your component are corruptEdit pins on all your passives reveals...

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 27, 2015, 12:26:42 pm
content: What does it reveal? I don't see anything wrong in the "Edit Pins" dialog. Can you please explain it?

author: free_electron
author_rank: Super Contributor
timestamp: March 27, 2015, 02:47:08 pm
content: looks like someone created alternates in the capacitor symbol....that single capacitor has like 20 representations.

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 27, 2015, 02:58:30 pm
content: Those are footprints. 12 for standard SMD packages and 20 for different size through hole film capacitors I have ever used. I don't understand the problem here. Is it wrong to add too many footprints to a schematics library?

author: AlfBaz
author_rank: Super Contributor
timestamp: March 27, 2015, 03:01:00 pm
content: Quote from: free_electron on March 27, 2015, 02:47:08 pmThat's what I thought and I wasn't about to load it up again (takes several minutes) but unfortunately I forgot to close it and reload my last work space so I had to wait for it againIt looks like they've added a heap of footprints to the schematic symbol and each column is the mapping between the schematic pins and the pads on each footprint. Deleting the caps and saving it drops it down to about 400kB like he said.I cant imagine that should add so much to the file size especially since they've done the same to the resistors

author: AlfBaz
author_rank: Super Contributor
timestamp: March 27, 2015, 03:14:12 pm
content: There appears to be a tonne of erroneous data attached to a field in the file called "SWAPIDPART"It's present in huge quantities in the original file, much, much less in the capless 400kB file but still there nonetheless

author: free_electron
author_rank: Super Contributor
timestamp: March 27, 2015, 04:27:27 pm
content: Quote from: hkBattousai on March 27, 2015, 02:58:30 pmyep. that is not the way to do it.you define a symbol with 1 package assigned.then you either clone that depending on the actual part , or you drive it from a database library.Think of it this way : if i tell you to use a TDK 1608C223ACQ capacitor. (which is the part you will be buying to install in the board ) you should not be able to mess that up. the library should have 1 and only one footprint assigned to that part. it is not a good idea to just be able to pick a different footprint.The library integrity is key in successful designs. Libraries need to be correct, unambiguous and unalterable.

author: hkBattousai
author_rank: Regular Contributor
timestamp: March 27, 2015, 06:00:47 pm
content: Quote from: free_electron on March 27, 2015, 04:27:27 pmWhat is a "datasheet library"? Is it like an online service or something I need to install on my computer? Is there a tool like this which automates footprint selection inside Altium?

author: ajb
author_rank: Super Contributor
timestamp: March 27, 2015, 06:42:13 pm
content: Quote from: hkBattousai on March 27, 2015, 06:00:47 pmA databaselibrary is one of Altium's native library types. I described how I use themhere. The gist is that they allow you to define schematic and footprint symbols once, and then reuse those symbols in any number of defined parts by linking them together in an external database (Access works fine for small setups, but you have option of using a 'real' database as well). You can also use the database to link in whatever other parameters you want to be used in BOM generation, etc.

author: amyk
author_rank: Super Contributor
timestamp: March 28, 2015, 06:09:13 am
content: For curiosity, attached is the contents of your file rendered as a grayscale image (1 pixel = 1 byte). You can see large regions of the same shade of gray with some small random streaks which are the more interesting data. As free_electron says you're probably misusing Altium to cause it to generate files like this - my guess is that the file format includes some sort of bit-array proportional to a number which is usually small, but which your use-case makes very large - whatever the "SWAPIDPART" field is for is the culprit here.

author: GK
author_rank: Super Contributor
timestamp: March 28, 2015, 06:18:53 am
content: Quote from: hkBattousai on March 26, 2015, 03:34:41 pmWell I guess not then. I have 99SE and AD13, so I can't tell you when the file compression option was deleted. I figured it was a fair assumption that you were using an old version as file bloat, unless you specifically disabled it, was a handy designed-in feature. I've have design files blow out to one hundred MB or more in 99SE, then "compact" down to a meg to two. I've never come across your problem in AD13 and I make my own libraries.

author: AlfBaz
author_rank: Super Contributor
timestamp: March 28, 2015, 06:32:52 am
content: Quote from: amyk on March 28, 2015, 06:09:13 amJust had a quick hex look at one of my schdoc's and there were only four instances of SWAPIDPARTTools->Configure Pin Swapping revealed the 4 pins belonged to a part I had setup pin swapping on 4 of its 12 pins.It looks like "SWAPIDPART" is tied up with the pin swapping feature which must be enabled for each and every footprint attached to the symbol. (edit- on his schematic)Never bothered setting up pin swapping on 2 port bi-directional parts as simply flipping them with the space bar in the pcb editor is a no-brainer

author: AlfBaz
author_rank: Super Contributor
timestamp: March 28, 2015, 06:35:58 am
content: Quote from: GK on March 28, 2015, 06:18:53 amMy guess is when they stopped using a database to store all the project documents (ie. after 99se) since the compression utility was a database compacting utility, generally available to all database files