Working with big vectors

My program works with a large vector of objects.
The problem is that the vector is to big to be stored in memory.
Is there any utility that will store the whole vector in a file
and seamlessly cache parts of it to memory ?
Thanks.

It seems I will have to build my own file mapping.
Since all my objects have the same size (e.g. all
Integers or String),
what is the best and fast way to read a specific
object (e.g. vector[200]) ? Also, what is the fast way
to read a bulk of objects (e.g. vector[200-300]) ?If your are dealing with integers or Strings I don't think you should go for a Vector filled with objects solution. You can minimize the memory requirements quite a bit if you use arrays.
Integers. Why not use an int array? Each int takes up 4 bytes in memory but an Integer Object adds an overhead of maybe 16 byte. If you use int's your memory need shrinks to a fifth.
Strings. A char takes 2 bytes. Maybe you can store a String as a byte array instead, thus saving 1 byte per char. The memory need shrinks to a half. It would be even more efficient if you just dumped all strings in one large byte array (with a null byte terminating each string). In addition you would need a second array with the start positions to the strings.
These are the densest in memory data structures you can get. If you still have too much data you will have to go for files. The in memory solutions I've suggested can be directly used with files (just substitute array with file).

Similar Messages

  • Speed up Illustrator CC when working with large vector files

    Raster (mainly) files up to 350 Mb. run fast in Illustrator CC, while vector files of 10 Mb. are a pain in the *blieb* (eg. zooming & panning). When reading the file it seems to freeze around 95 % for a few minutes. Memory usage goes up to 6 Gb. Processor usage 30 - 50 %.
    Are there ways to speed things up while working with large vector files in Illustrator CC?
    System:
    64 bit Windows 7 enterprise
    Memory: 16 Gb
    Processor: Intel Xeon 3,7 GHz (8 threads)
    Graphics: nVidia Geforce K4000

    Files with large amounts vector points will put a strain on the fastest of computers. But any type of speed increase we can get you can save you lots of time.
    Delete any unwanted stray points using  Select >> Object >> stray points
    Optimize performance | Windows
    Did you draw this yourself, is the file as clean as can be? Are there any repeated paths underneath your art which do not need to be there from live tracing or stock art sites?
    Check the control panel >> programs and features and sort by installed recently and uninstall anything suspicious.
    Sorry there will be no short or single answer to this, as per the previous poster using layers effectively, and working in outline mode when possible might the best you can do.

  • Problem of crashing in Ill. CS5 when working with big files.....

    Hello, I'm working as a cartographer at Port of Rotterdam and frequently work with big maps in Illustrator CS5. As soon as the filesize exceeds 150 MB, and especially when small rasterfiles (mostly jpg's) are placed inside the document, either embedded or not-embedded, me and my collegue get notifications indicating "Can't show preview"or worse: The operation can't be concluded due to lack of RAM (dutch translation). This being a last warningsign just before CS5 collapses and it thus becomes impossible to make any Save on the document.... The hardware we work with: Quad Core 3GHz;NVidia Quadro 1GB;Windows XP with SP3, DirectX9; 8GB int. memory. We hope to find out the reasons of the frequent collapses and if you know of any possible solutions. On behalf of many of my collegues, thank you in advance for replying, greetings, Fred van Eck

    There can be other causes for instance if your scratch disk is fragmented and if your scratch disk has gotten overloaded with actual files storage.
    Or if the permissions for the scrtch has been changed for some reason.
    The scratch need a lot of free contigious free space to work well with large files.
    Even with CS 6 you can have a problem if your scratch is not healthy.
    Do you have a dedicated drive or partition of one as a primary scratch, does the scratch have a fast enough buffer (cache)? Current drives run 32 MB and 64 MB cache.
    Is the file stored on a fast disk?
    If you work on large files consider storing them on a RAID 0 for while working on them and storing the final some where else.
    CS 6 should be helpful but you need lots for RAM I would not run a system and work on large files with 8GB of memeory 16GB should be your minimum.
    If you are working in a professional envoronment then you really need a professional set up and make your life easier and save money in the time you save.
    It is expensive to set up but wotth it in the end.

  • [svn] 1317: Updates to get flex working with the Vector stuff.

    Revision: 1317
    Author: [email protected]
    Date: 2008-04-20 12:12:54 -0700 (Sun, 20 Apr 2008)
    Log Message:
    Updates to get flex working with the Vector stuff. Had to add support for the new name type, and new applytype opcode to the Optimizer/Merger that flex uses. Also had to slightly change how the instantiated vector classes find their declared methods. Previously they were copied into the new class, but now they just point to the original vector class.
    Modified Paths:
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/ConstantPool.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/Decoder.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/Encoder.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/OpcodeVisitor.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/Opcodes.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/Printer.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/Scanner.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/abc/Visitor.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/parser/Parser.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ConstantEvaluator.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/FlowAnalyzer.java
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/semantics/ReferenceValue.java

    despite the workaround, it doesn't fix the real problem. It shouldn't be a huge deal for adobe to add support for multiple svn versions. Dreamweaver is the first tool i've used that works with svn that doesn't support several types of svn meta data. If they're going to claim that Dreamweaver supports svn is should actually support svn, the current version, not a version several years old. This should have been among the first patches released, or at least after snow leopard came out (and packaged with it the current version of svn).
    does anyone know if the code that handles meta data formatting is something that is human readable, or where it might be, or is it in compiled code.
    i signed up for the forums, for the sole purpose of being able to vent about this very frustrating and disappointing situation.

  • Working with big files

    I would appreciate any suggestion as to how best one can work with big files.  I have eight one hour tapes containing information about various places I visited.  Some contain only one place while others can contain two or more places. As a preference I like to create up to one hour DVDs that contain an identifiable segment; eg either one place only or more but I do try not to break up a place and record it on two DVDs.  However, the problem I faced in the past, is that by the time I get to the end of an hour, the program Premiere Elements 7 (PE7) is getting slow and keeps telling me that it is running out of memory. That is despite the fact that I have 3 GM of RAM and over 200 GB of dedicated separate hard drive.  I tried saving segments under ‘Share’, ‘DV AVI’ and selecting ‘DV PAL Standard’ (the system I use), but the result, as far as quality was concerned, was very disappointing. There is no option to change or set quality as was the case in previous versions of PE.  Nor can I combine two .prel files into one while I am editing. 
    Is there any other way I can work in segments, say 15 minutes, and combine them at the end without losing on the quality? 
    Any suggestion would be most appreciated.
    Tom 

    Hi Steve
    It is a Sony DCR-HC40E PAL, and they were captured as AVI clips.
    The project settings are:
    General – not highlighted but it shows DV Pal and 25.00 frame/second
    Video – 720 horizontal 576vertical (4/3)
    Display format - 25 fps Timecode
    Capture – DV Capture
    Tom

  • Advice needed: The way to solve out of memory problem (or the way to work with big csv files)

    Hello:)
    I'm in trouble: I have a big csv file (over 5gb of web-analytics data) and my 64 bit excel (and 6gb ram)
    I cant load file to data model because of it's size. There is an error "out of memory" in power query. 
    This is the first time when I encountered such a problem.
    What options do I have to work with such a file? To increase memory in my computer? Would it solve the problem? How much do I need to work with 6gb csv? 
    Or may be I can upload my data somewhere to azure and work with it there? 
    So the problem - is there any way to deal with big files using power query? Or I need to become a developer and learn sql or other languages? 
    Thanks in advance.
    Max

    Hi Miguel!
    Thanks for your answer. 
    I've tried to load this file on virtual pc from azure cloud with this config:
    I have increased memory limit in power query settings:
    And still, the proble is the same:
    What I do wrong? 

  • Working with labelled vector graphics (CS4)

    I've working with a rather large set of simple geometric vectors.
    They've all been created in illustrator, but need to be scaled in InDesign and flow with the text.
    The only method I've come up with is somewaht convoluted, so I thought I'd share and see if anyone had any suggestions on how I might improve the workflow.
    - vector graphic is pasted (not placed) into InDesign and ungrouped
    - strokes are converted (manually) to object styles (graphic styles created in illustrator are lost)
    - graphis is regrouped and roughly scaled
    - labels are added and paragraph styles applied
    - labels are grouped with graphic, cut, and "paste into" anched text box
    - re-scaling and label edits are done with select content/container/next object
    More complicated graphics will be linked and rescaled in illustrator and relabelled and placed as above.
    Is there a better/easier way to do this?
    (Maybe CS5 will have a container isolation mode...)

    I want to keep the labels out of illustrator, but there are a few graphics with more detail that percentage scaling is the way to go.
    It would be far easier if InDesign would respect (i.e. import, map) Illustrator's graphic styles.

  • How can I work with big iMovie 6 file?

    I am trying to make a one 70 minute movie with iMovie 6 but am having great difficulties because the file has reached 78 gig and is now unworkable because it is just too slow to even play. Even cutting it in half does not solve the problem. Each half will play but I can't work with them in the timeline. I need to add more audio files and music. Any suggestions?

    I suspect most slowdowns occur because of complex audio, not the size of the project. It sometimes helps to export the audio to an AIFF file, then re-import that file back into the project and place it in its own audio track. When you disable the audio of the other tracks, playback is improved.
    That makes it harder to edit a half-finished project, however. It's a technique best reserved for almost-finished projects.
    You could export the timeline to the camera, then re-import it to a new project. That will both make the project smaller and "flatten" its audio and video. Most clips will return as the clips they are now.
    70 minutes of video is ordinarily about 15GB, so something has increased the size substantially. (That's not normally a problem you have to worry about; the size of the project itself is probably not the problem.)
    Karl

  • In mail drag and drop to desktop does not work with big pictures in 10.9

    My drag and drop function in apple mail program does not working anymore after upgrade to macos 10.9
    Big picture in my mail does not want to drag to the desktop anymore!
    Imac 2.93 Ghz core i7

    Hello,
    Please give your SPS (Java) and Patch level of BIBASES & BIWEBAPP.
    Regards, Karol
    SAP NetWeaver BI, Development

  • Can motion 5 work with imported vector graphics?

    Hey everyone, does motion 5 allow you to import vector artwork files such as eps or adobe illustrator files?

    You need to change your illustartor or eps files to pdf (either in illustratrator or preview). Someone correct me if I'm wrong, but I don't think you can keep your layers.
    One thing to look out for... the default is for the pdf to be rasterized - if you don't want jaggies you turn it off by selecting it in the media tab, then go to the inspector media tab > media controls and click off Fixed Resolution (or give it a higher fixed width/height). Not extremely intuitive, but it gets the job done...

  • Working with Big Excel Sheet

    Hello All,
    I have a large excel sheet having 50K rows and I am constrained to not use more than 250 MB of Heap space.
    Using Apache poi API the creating new WorkBook Object itself gives MemoryOutOfSpace Error
    Workbook source = WorkbookFactory.create(new FileInputStream(Path));
    Please suggest some solution/work around. I am open to use some other API as well but preference lies for Apache poi.
    Thanks In Anticipation
    Shivam

    This is the sample code that I am running, I am only creating an Workbook object and then traversing the excel. I am getting the java.lang.OutOfMemoryError: Java heap space error
    package excel;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import org.apache.poi.ss.usermodel.Cell;
    import org.apache.poi.ss.usermodel.Row;
    import org.apache.poi.ss.usermodel.Sheet;
    import org.apache.poi.ss.usermodel.Workbook;
    import org.apache.poi.ss.usermodel.WorkbookFactory;
    public class BigFile {
         private static String DATE_FORMAT = "yyyy_MM_dd_HH_mm_ss";
         public static String calcTimeStamp()
              Date date = new Date();
              SimpleDateFormat format = new SimpleDateFormat(DATE_FORMAT);
              return format.format(date.getTime());
         public static void main(String args[])
              String Path = "C:\\EXCEL\\Large.xls";
              long t = System.currentTimeMillis();
              try {
                   Workbook source = WorkbookFactory.create(new FileInputStream(Path));
                   Sheet sheet = source.getSheetAt(0);
                   for (Row row : sheet)
                        for (Cell cell : row)
              }catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              }catch (Exception e)
                   e.printStackTrace();
              }finally {
                   System.out.println("Total Time Taken "
                             + (System.currentTimeMillis() - t)/1000 + " seconds");
                   System.out.println("End Time :" + calcTimeStamp()+" in "+System.getProperty("user.timezone")+" timezone");
    Here is the Stack Trace
    Total Time Taken 10 seconds
    End Time :2011_03_31_09_40_26 in Asia/Calcutta timezone
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Unknown Source)
         at java.util.Arrays.copyOf(Unknown Source)
         at java.util.ArrayList.ensureCapacity(Unknown Source)
         at java.util.ArrayList.add(Unknown Source)
         at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:443)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:263)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:188)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:305)
         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:286)
         at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:60)
         at excel.BigFile.main(BigFile.java:33)

  • Will an onboard garaphic card work with the lates version of photoshop or do I have to have a dedicated graphic card

    Will an onboard graphic card work with the lates version of photoshop or do I have to have a dedicated garphic card

    Most likely you should be fine.  Some of the early i7s might not support it (did the first i7 core have integrated GPU?), but any of the last couple are fine.  The nice thing is, that you can always add an aftermarket GPU if you need to, so give it a shot.
    I have a Haswell i7 (4770k) in my desktop PC, and it's more than enough.  I did a lot of research when I built my PC and my conclusion at the time was that a GPU doesn't offer a sizable performance boost unless you buy a really nice GPU ($400+).  The integrated GPU can run all the functions of CS6.
    My laptop is an older i5.  Not sure which, but I think Sandy Bridge.  I can notice the difference in process times between the integrated GPU and discrete (AMD).  But only on certain heavy filters and when working with big composites (~2 gb files).  But that's an i5 and and older one.  That said, the integrated GPU is far more stable, so I usually just put up the lag instead of having the AMD GPU crash my computer.

  • Does fusion drive work with network accounts

    Hi,
    We are planning to buy new desktop systems.
    Since we work with big files, we love the idea about Fusion drive.
    Now my only question. Does this help when you use Network drives.
    Since the files are not stored on the system, but on the network, I think its better to have a server with fusion in it?
    An other solution might be using a mobile account on the desktop servers.
    Since (a copy of) all files is stored on the computer I think the speed will be approved if we use files wit fusion drive.
    Hope somebody can give his opinion with should be the best solution.
    Now working on the systems is very slow, and often a "turning ball" system is there, when we are accessing files.
    Regards,
    Flip

    Hi Uptime Jeff,
    I 100% agree with your comment.
    I would love to stop using network drives. It is slow, and I have often problems if the network is having issues.
    There is only 1 reason why we use network drives and that is because we work on iMacs in office, and use Macbooks abrought. Since we can use the same homedrive (especially the /library/ folder with settings, passwords etc) on iMac and Macbook we make use of network drives.
    Is there an other way to do this, then we can stop the full network drive.

  • JK Adobe TV - Top 5 Tips for Working with Vectors in CC

    Julieanne Kost has just blogged about her  Adobe TV video on working with shapes and paths in Photoshop CC.  It's actually not that new to Adobe TV, and has already had a lot of views, but we get a lot of questions here on the subject with CC, and there are some nice little tips in it.  I certainly learned a couple of things. :-)
    http://blogs.adobe.com/jkost/2014/01/top-5-tips-for-working-with-vectors-in-photoshop-cc.h tml
    http://tv.adobe.com/watch/the-complete-picture-with-julieanne-kost/top-5-tips-for-working- with-vectors-in-photoshop-cc/

    My apologies, but I really had no interest in a member's "answer", especially one that is so unhelpful.  Assuming that you were responding to me (we are the only two commenter's at this point), I would not be inclined to read the Creative Cloud offers since this is something that I am not interested in.  I bought the product the first day of offer, I did not rent it....just like I have in all the years past.

  • Big Fish Games stop working in Mavericks.  What do I do? I have re-installed them and the manager app, and nothing.  I have not gotten an answer from Big Fish tech staff.  Thought the problem might be with Maverick.  all the games worked with Snow Leopard

    Big Fish Games stop working in Mavericks.  What do I do? I have re-installed them and the manager app, and nothing.  I have not gotten an answer from Big Fish tech staff.  Thought the problem might be with Maverick.  all the games worked with Snow Leopard
    Any body have this kind of problem.  What was done to correct it. . .

    I can't wait to get a new phone as well. LG Revolution owners should be comped for this phone if Verizon intends to keep them as customers.

Maybe you are looking for