| | |
Design issues
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2008
Posts: 30
Reputation:
Solved Threads: 0
Hello,i am developing an indexer that indexes html pages.My problem lies in the aspect of creating a global index of all the stored pages in the reprository.I need a method that will be suitable for quick retrieval and insertion of new data.I have tried using STL MAP but i do not know how it will perform with so many data in it.I was told a b-tree can do it.
What are your suggestions for a problem like this?
Thanks
What are your suggestions for a problem like this?
Thanks
•
•
•
•
Am looking at up to a billion,i haven't such data yet,but i would like to know if someone has an idea on how it will perform
Really all you need to worry about with performance is paging and locality of reference. If there are a lot of items in memory that are in different pages, the computer will be swapping pages in and out and that slows memory accesses. If there are so many items that RAM cannot hold it all, the whole machine can slow down as memory gets swapping and out of virtual memory.
•
•
•
•
especially when trying to load from a file.
If loading the whole file is too slow, you can use windows into the file and only process part of it at any time. Just make sure that the file format makes seeking possible. -Tommy (For Great Justice!) Gunn
•
•
Join Date: Dec 2008
Posts: 30
Reputation:
Solved Threads: 0
•
•
•
•
The STL map class has performance guarantees that match a balanced search tree. The height will be small for a billion items, like 2*log(n) for a red black tree, so lookup is quick. When lookup is quick, insertion and deletion will be quick too.
Really all you need to worry about with performance is paging and locality of reference. If there are a lot of items in memory that are in different pages, the computer will be swapping pages in and out and that slows memory accesses. If there are so many items that RAM cannot hold it all, the whole machine can slow down as memory gets swapping and out of virtual memory.
Files are slow. There is no getting around that.If loading the whole file is too slow, you can use windows into the file and only process part of it at any time. Just make sure that the file format makes seeking possible.
The main question now is,how do i ensure great perfomance when loading an STL map of a billion pages into memory.I need your suggestions..
Thanks in advance
Last edited by codedhands; Aug 25th, 2009 at 5:17 pm.
•
•
•
•
Is it possible to seek a map while saved in a file.How do you suggest i make windows for the file?
•
•
•
•
The main question now is,how do i ensure great perfomance when loading an STL map of a billion pages into memory.
-Tommy (For Great Justice!) Gunn
![]() |
Similar Threads
- Create Forums in ASP .NET (ASP.NET)
- Seeking Experienced Web Designer/Coder (Web Development Job Offers)
- DB Design Issues (Oracle)
- Help on General Best Practices for Table/Database Design (Database Design)
- Reservations Design Issues (MS Access and FileMaker Pro)
- veena and other people again help (Visual Basic 4 / 5 / 6)
- Latest Jupiter Media Tips & Stats from Search Engine Strategies 2005, New York (Search Engine Optimization)
- Web Site Design Help (Site Layout and Usability)
Other Threads in the C++ Forum
- Previous Thread: openCV Image Transformation
- Next Thread: Writing algorithms help
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






