Additional Index on the ODS

Hello,
I needed to create an additional index on the ODS and I have done it via SE11 --> index. An index got created but it cannot be transported since it has a dev class $TMP. We were not able to find a way to change a dev class. I deleted that index and tried to create it via RSA1 --> InfoProvider --> Edit ODS. When I created an index, I tried to activate an ODS. The ODS cannot be activated now. The message is "Error adjusting the database".
What can I do to be able to activate that ODS? Thanks
Polina
203-849-6498
[email protected]

Every developer should have SE14 access in the development system. If your company security personnel don't like to give that access, just walk to a friendly basis person and have him or her run the transaction.
Remember to request the SE14 authorization formally so that you will have it when you need it next time!

Similar Messages

  • Cube is not synchronize with the ODS

    Hello,
    I have a SL cube which gets the data from ODS and work perfect for almost 3 years. Today I tried to compare between the ODS to the cube and found big gaps in the next period (the old data is fine). All the recent uploads where fine. The cube indexes are fine and everything look good except of the data.
    What can it be?
    Please Advice,
    David

    David,
    If you have automatically update data to data targets , check if you have every request going into the Cube ... also check in the report andnot in Listcube , the additive delta option sort of skews data , best way is to check the data in a report.
    Arun
    Assigning points is a way of saying thank you in SDN
    Message was edited by: Arun Varadarajan

  • How to get additional field from the second list base on lookup information column ?

    Hi everyone,
    Currently I created a SharePoint hosted Apps project and I need to know how can I get additional field from the second list base on lookup information column. example List1 Have 2 columns column1 and column2(Lookup Information from list2 (category)),
    List2 have 3 columns title, and category, and color.  so how can get the title and color from list2 base on this lookup information column (SharePoint Hosted apps and Javascript code)? that is possible?
    Best regards,
    ------------------------------------------------------------ ---Tola---

    You can build one custom lookup control. Refer to the following post
    http://www.stuartroberts.net/index.php/2012/10/03/enhanced-lookup-field-part-1/
    Alternatively, try the following solution from codeplex
    http://sp2010filteredlookup.codeplex.com/
    http://filteredlookup.codeplex.com/
    --Cheers

  • Query time lengthened after additional indexes added

    I had been frequently getting results from my query in about .5 - 1.5 seconds. However, I added additional indexes to my container on fields that I am not even using in my query at the moment. When I did this, my query went to about 35 seconds. Can anyone tell me how to fix this problem
    Here is my query:
    for $record in collection("Catalog.dbxml")
    /*[T245[contains(.,"augustine") or contains(.,"Augustine") or contains(.,"AUGUSTINE")]] return $record
    Here are my indexes:
    Index: node-element-substring-string for node {}:T050
    Index: node-element-substring-string for node {}:T090
    Index: node-element-substring-string for node {}:T100
    Index: node-element-substring-string for node {}:T110
    Index: node-element-substring-string for node {}:T111
    Index: node-element-substring-string for node {}:T245
    Index: node-element-substring-string for node {}:T246
    Index: node-element-substring-string for node {}:T700
    Index: node-element-substring-string for node {}:T710
    Index: node-element-substring-string for node {}:T711
    Here is my queryplan:
    <XQuery>
    <Navigation>
    <QueryPlanFunction result="collection" container="Catalog5.dbxml">
    <OQPlan>n(V(node-element-substring-string,T245,=,'ine'),V(node-element-substring-string,T245,=,'tin'),V(node-element-substring-string,T245,=,'sti'),V(node-element-substring-string,T245,=,'ust'),V(node-element-substring-string,T245,=,'gus'),V(node-element-substring-string,T245,=,'aug'),V(node-element-substring-string,T245,=,'ugu'))</OQPlan>
    </QueryPlanFunction>
    <Step axis="child" uri="*" name="*" nodeType="element"/>
    <DbXmlFilter>
    <Navigation>
    <Step axis="child" name="T245" nodeType="element">
    <Predicates>
    <Operator name="or">
    <Navigation>
    <DbXmlContains>
    <OQPlan>n(V(node-element-substring-string,T245,=,'ugu'),V(node-element-substring-string,T245,=,'gus'),V(node-element-substring-string,T245,=,'ine'),V(node-element-substring-string,T245,=,'sti'),V(node-element-substring-string,T245,=,'tin'),V(node-element-substring-string,T245,=,'ust'),V(node-element-substring-string,T245,=,'aug'))</OQPlan>
    <Sequence>
    <AnyAtomicTypeConstructor value="augustine" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlContains>
    </Navigation>
    <Navigation>
    <DbXmlContains>
    <OQPlan>n(V(node-element-substring-string,T245,=,'ine'),V(node-element-substring-string,T245,=,'tin'),V(node-element-substring-string,T245,=,'ust'),V(node-element-substring-string,T245,=,'sti'),V(node-element-substring-string,T245,=,'gus'),V(node-element-substring-string,T245,=,'ugu'),V(node-element-substring-string,T245,=,'aug'))</OQPlan>
    <Sequence>
    <AnyAtomicTypeConstructor value="Augustine" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlContains>
    </Navigation>
    <Navigation>
    <DbXmlContains>
    <OQPlan>n(V(node-element-substring-string,T245,=,'ust'),V(node-element-substring-string,T245,=,'aug'),V(node-element-substring-string,T245,=,'ugu'),V(node-element-substring-string,T245,=,'gus'),V(node-element-substring-string,T245,=,'tin'),V(node-element-substring-string,T245,=,'sti'),V(node-element-substring-string,T245,=,'ine'))</OQPlan>
    <Sequence>
    <AnyAtomicTypeConstructor value="AUGUSTINE" typeuri="http://www.w3.org/2001/XMLSchema" typename="string"/>
    </Sequence>
    </DbXmlContains>
    </Navigation>
    </Operator>
    </Predicates>
    </Step>
    </Navigation>
    </DbXmlFilter>
    </Navigation>
    </XQuery>

    Hi Andrew,
    You experience surprises me a little - I'd like to look into reproducing what you are seeing.
    Can you tell me which indexes you had to start with and which indexes you then added to cause the slow down? Is it possible for you to send me some sample data that exhibits this behavior - either the XML, or your container? If so, can you upload it to ftp.sleepycat.com/incoming and let me know what you've named the file.
    Thanks,
    John

  • Is it possible to store a multiple indexes for the same value extractor?

    I ran into a situation where there were different queries that I was interested in doing that might have benefitted from having several indexes, sorted differently, but for the same ValueExtractor() instance.
    Is this good practice, is it recommended, and is there a clean way to do it? It seemed like the only way I could logically "trick" the system into it would be passing some sort of "query type" constant into the ValueExtractor when it was created, and then making the equals and hashCode() methods on the ValueExtractor delegate to the constant for equality, but this seemed like a massive hack.

    Hi Kris,
    First, try without each value extractor and see how the different queries compare in performance. You may find that you need only one. If you find otherwise, please let us know because it may indicate a good area for additional optimizations.
    Second, you are correct that the value extractor is the key of the index, and thus to have two indexes on the same value, you will need two different value extractors (i.e. the hashcode/equals comment you made.)
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Coherence: Easily share live data across a cluster!

  • Error while activating the ODS

    Dear Experts,
    Please help me out,
    I am facing one problem while activating the ODS of 0FIGL. Data is uploaded successfully into the ODS but while activeting the ODS, it gives the following error message :
    Error when assigning SID: Action VAL_SID_CONVERT InfoObject 0DOC_HD_TXT
    Value 'SWITCH 24 PORT MANAGED -I' (hex. '00530057004900540043004800200032003400200050004F00') of characteristic 0DOC_HD_TXT
    SID determination finished for InfoObject 0DOC_HD_TXT
    I have also read out all the related post & also applied them in this but still the position is same.
    also in RSKC, all the characters are allowed.
    please suggest.
    Thanks in advance
    Neha
    Process 000090 returned with errors

    Hi,
    Pliz go thru below article for restricting Invalid chars.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0afbb81-f219-2c10-4181-b20f6b10e373?quicklink=index&overridelayout=true
    It might give u an idea or solve your issue.
    Thanks,
    Jitender.

  • How can I create an index on the date part of a timestamp field?

    is there a way I can create an index on the date part of a timestamp field?

    LONGENECKER wrote:
    Idea:
    If you find no direct command that allows you to create an index on JUST the date portion of a timestamp datatype column then I recommend you consider splitting date and time into two seperate columns.
    If date is column "A" and time is column "B" then you can concatenate them using a view or virtual column (in 11G) to re-assemble them at run time.
    In the solution I describe above you might trade ease of management for better performing queries.
    Additional Info:
    This thread may be of some value.
    Can we create INDEX on TIMESTAMP column???
    And what datatype do you propose for your columns A and B? The only proper datatypes would be DATE or TIMESTAMP. Both of these inherently carry both date and time components, so that would have to be dealt with anyway. The use of any character or number datatype to hold date and/or time should be treated with an application of Billy's lead pipe.
    Perhaps function based indexes would be a better solution.

  • Problems of Creating Indexes in the ProcessChain

    Hi, Experts!
    When I dragged the infopackage of updating data into InfoCube, there are two deleting index processes comes out,one is deleting index with InfoCubes, the other one is deleting index with InfoPackages.
    Then the question comes: what the difference between the two processes? Do I need to have the two processes in the process chain at the same time?
    Does anyone help me?
    Thx in advance!

    Hi,Siggi !
    Thank you!
    But what the diffence between them?
    Does the ODS attribute to the problem?
    Are there any problems if i take the two together?
    Could please give me some more info?

  • R3load procedure creates additional tables in the target system

    Hi All
    My source  system  is  46C SR2 /oracle 817/HP_UX PARISC           and
    Target System  is  46CSR2 /Oracle 10202/HPUX IA
    I used R3load procedure to export database from source system and completed import successfully into  target system without any problem.The new system is up and running.
    My Source system has total 23193 tables but the target system has 23771 tables and source system has 27011 indexes and the target system has 27701 indexes.
    Can someone  tell me why there are additional tables and indexes in my  Target system.
    Your help will be appreciated.
    Thanks

    I used wrong id.I want to open a new message

  • Navigation attributes while creating the ODS

    Hi all.
       can you pls let me know what is the use of navigation attributes folder while creating ODS.& also about index folder.
    Kind Regards,
    sami.

    Hi,
    Navigational Attributes folder: If you have info-object like 0Material in your ODS then attributes of info-object 0MAterial which are marked as navigational comes under this folder and there is an option of check marking these navigational attributes. If you check mark this navigational attribute it will be available in reporting just like another info-object(means you can put filter on this navigational attribute).
    Index Folder: Basic reason to have index folder is same as "indexing" this improves the reading from this ODS. Like if you are pulling records from this ODS or you have written select query on this ODS in your routines, indexing on this ODS will improve reading drastically. you can pull info-objects into index folder on the basis of which you are reading data from this DSO, it will improve reading.

  • Activating the ODS in the background

    We have just applied secondary indexes to a very large ODS object in our Production environment.  The system allows me to save the changes to the ODS, however, when I try to activate the ODS object, it is timing out.  I assume this is because the system is creating the indexes upon activation.  How do I activate the ODS object in the background?  Since the original activation timed out, do I need to do any cleanup before attempting to activate the ODS in the background?  Any help is very appreciated.

    HI,
    Activate you ODS when the server load is relatively low.
    Following things are to be considered when ODS activation fails:
    1. If your ODS activation fails, in BW SM37, job will fail. This doesnot mean that you reactivate it immediately. There are some chances that it will fail again.
    <b>Reason:</b>
       It will take some time to rollback all the activated records (as activation of some records might have happened).
    <b>HOW to know Rollback taken place or not..?</b>
    1. In SM37 Double Click on (Failed) Job
    2. Click on "Job Details" button
    3. Pop-up window will be displayed
    4. Note down "Executing Server Name" & WP Number/PID
    5. Go to Tcode: SM51, You can see Application server names
    6. Find your Servername and click on the server
    7. You will navigate to another screen
    8. In that PID (3rd Column) you click on the PID# (that you have noted)
    9. If the PID is still running with records, then it means that records are still rolling back.
    10. Once the rollback is over, all that data will be displayed with "0 (zero)" records.
    Then you activate your ODS. Now the ODS activation will run on new PID#.
    <b>Note:</b>
    If you start running immediately after ODS activation failure, then ODS activation will run on the same PID# which it previously ran and activation makes slower (and timeout might happen).
    Check stpes from 1 to 10 when any ODS activation takes place you can know how the records are updating.
    Hope this helps you....
    Thanks,
    Shyam

  • How can i make indexes on the Master data table

    Hi Gurus,
    I got a query, in this one i have an Infoobject with many values, like to say invoice number, and i filter and need a lot of Nav Attr of this IO, for this reason the query performance its really bad but i dont know what to do, some friend advice me this : So I would suggest some indexes on the Master data table of your IO for the navigationnal attributer you want to use.
    what else can you tell me? if i put this IO in Line item dimension? , or just with flag high cardinality ? help guys.....

    Hi Jorge.....
    Look.........Line item dimension and High Cardinality r related to each other..............Characteristic which has High Cardinality..we will use it as Line item dimension..........But........A dimension marked as a line item cannot subsequently include additional characteristics.......... This is only possible with normal dimensions...........If u r very sure.............then u can go for Line item dimension............no issues........
    U can also try to Create index..............
    Check this...........
    Re: Indexes on Master Data tables
    Regards,
    Debjani..........

  • Hi Guys,  I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out

    Hi Guys,
    I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out as this web-site has been payed for by my client.
    Alex

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • How can I access the value of a loop index outside the loop?

    I have a sequence structure in Labview 8.6.  At one frame of the sequence I have a while loop.  The loop runs for a while and then stops and the program then moves to the next frame of the sequence.  Several frames further on down the sequence I have a cluster, the elements of which are outputs on the front panel.  The index of the mentioned loop is one of the cluster elements, an numeric output.  While the loop is running, I want the index to be displayed on the front panel in the output contained in the cluster.  How can I do this?

    The easiest way to do this is to use a local variable of your cluster.  You'll need one copy set to read; connect that to a bundle by name, bundle in your index value from the loop, and wire the bundle output to a write copy of your local variable.  You can create a local variable by right-clicking on the cluster terminal (in the block diagram) and choosing create local variable.  You can change the local variable to read or write by right-clicking on it.
    However, in general the use of both local variables and sequence structures is discouraged, and the right solution may be to rewrite your code with a while loop containing a case structure in which you update the cluster every time through the loop.  This will look like a state machine; you'll also need a shift register in place of the loop iteration counter.  If you post your code (ideally the VI, but if not then a screenshot of the block diagram) then we can provide more useful assistance.

  • How to update a large (over 4 million item) List(Of Byte) quickly by altering indexes contained in a Dictionary(Of Integer, Byte) where the Dictionaries keys are the indexes in the List(Of Byte) that need to be changed to the values for those indexes?

       I'm having some difficulty with transferring images from a UDP Client to a UDP Server. The issue is receiving the bytes necessary to update an original image sent from the Client to the Server and updating the Servers List(Of Byte) with the
    new bytes replacing bytes in that list. This is a simplex connection where the Sever receives and the Client sends to utilize the least amount of bandwidth for a "Remote Desktop" style application where the Server side needs image updates of whatever
    occurs on the Client desktop.
       So far I can tranfer images with no issue. The images can be be any image type (.Bmp, .Gif, .JPeg, .Png, etc). I was working with sending .JPeg's as they appear to be the smallest size image when a Bitmap is saved to a memory stream as type
    .JPeg. And then I am using GZip to compress that byte array again so it is much smaller. However on a loopback on my NIC the speed for sending a full size screen capture is not very fast as the Server updates fairly slowly unless the Clients screen capture
    Bitmap is reduced in size to about 1/3'd of the original size. Then about 12000 bytes or less are sent for each update.
       Due to .JPeg compression I suppose there is no way to get the difference in bytes between two .JPegs and only send those when something occurs on the desktop that alters the desktop screen capture image. Therefore I went to using .Bmp's as each
    .Bmp contains the same number of bytes in its array regardless of the image alterations on the desktop. So I suppose the difference in bytes from a second screen capture and an inital screen capture are what is different in the second image from the initial
    image.
       What I have done so far is save an initial Bitmap of a screen capture using a memory stream and saving as type .Bmp which takes less than 93 milliseconds for 4196406 bytes. Compressing that takes less than 118 milliseconds to 197325 bytes for
    the current windows on the desktop. When that is done PictureBox1 is updated from nothing to the captured image as the PictureBox's background image with image layout zoom and the PictureBox sized at 1/2 my screens width and 1/2 my screens height.
       Then I save a new Bitmap the same way which now contains different image information as the PictureBox is now displaying an image so its back color is no longer displayed (solid color Aqua) and the cursor has moved to a different location. The
    second Bitmap is also 4196406 in bytes and compressed it was 315473 bytes in size.
       I also just found code from this link Converting a Bitmap to a Byte Array (and Byte Array to Bitmap) which gets a byte array
    directly from a Bitmap and the size of that is 3148800 for whatever is full screen captured on my laptop. So I should be able to work with smaller byte arrays at some point.
       The issue I'm having is that once the Client sends an image of the desktop to the Server I only want to update the server with any differences occuring on the Clients desktop. So what I have done is compare the first screen captures bytes (stored
    in a List(Of Byte)) to the second screen captures bytes (stored in a List(Of Byte)) by using a For/Next for 0 to 4196405 where if a byte in the first screen captures List is not equal to a byte in the second screen captures List I add the index and byte of
    the second screen captures list to a Dictionary(Of Integer, Byte). The Dictionary then only contains the indexes and bytes that are different between the first screen capture and second screen capture. This takes about 125 milliseconds which I think is pretty
    fast for 4196406 byte comparison using a For/Next and adding all the different bytes and indexes for each byte to a Dictionary.
        The difference in Bytes between the inital screen capture and the second screen capture is 242587 as an example which changes of course. For that amount of bytes the Dictionary contains 242587 integers as indexes and 242587 bytes as different
    bytes totaling 485174 bytes for both arrays (keys, values).  Compressed the indexes go from 242587 to 43489 bytes and the values go from 242587 to 34982 bytes. Which means I will have to send 78, 481 bytes from the Client to the Server to update the display
    on the server. Quite smaller than the original 4196406 bytes of the second Bitmap saved to type .Bmp or the compressed size of that array which was 315473 bytes. Plus a few bytes I add as overhead so the server knows when an image array ends and how many packets
    were sent for the array so it can discard complete arrays if necessary since UDP is lossfull although probably not so much in current networks like it may originally have been when the internet started.
        In reality the data from the Client to the Server will mostly be the cursor as it moves and updating the Server image with only a few hundred bytes I would imagine at a time. Or when the cursor selects a Button for example and the Buttons
    color changes causing those differences in the original screen capture.
       But the problem is if I send the Dictionaries Indexes and Bytes to the Server then I need to update the original Bitmap List(Of Byte) on the server by removing the Bytes in the received informations Index locations array from the Servers Bitmap
    List(Of Byte) and replacing those Bytes with the Bytes in the received informations Byte array. This takes so long using a For/Next for however many indexes are in the received informations Index array to update the Bitmap List(Of Byte) on the server using
    "Bmp1Bytes.RemoveAt(Index As Integer)" followed by "Bmp1Bytes.Insert(Index As Integer, Item As Byte)" in the For/Next.
        I've tried various For/Next statements including using a new List(Of Byte) with If statements so If the the integer for the For/Next ='s the Key in a Dictionary(Of Integer, Byte) using a Counter to provide the Dictionaries Key value then
    the Dictionaries byte value will be added to the List(Of Byte) and the counter will increas by one Else the List(Of Byte) adds the original "Bmp1Bytes" byte at that index to the new List(Of Byte). This takes forever also.
       I also tried the same For/Next adding to a new Dictionary(Of Integer, Byte) but that takes forever too.
       I think I could use RemoveRange and AddRange to speed things up. But I don't know how to retrieve a contiguous range of indexes in the received indexes that need to be updated in the servers "Bmp1Bytes" List(Of Byte) from the received
    array of indexes and bytes which are in a Dictionary(Of Integer, Byte).  But I believe this would even be slower than some realistic method for replacing all Bytes in a List(Of Byte) when I have the indexes that need to be replaced and the bytes to replace
    them with.
       Even if I just used AddRange on a new List(Of Byte) to add ranges of bytes from the original "Bmp1Bytes" and the changes from the Dictionary(Of Integer, Byte) I think this would be rather slow. Although I don't know how to do that
    by getting contiguous ranges of indexes from the Dictionaries keys.
       So I was wondering if there is some method perhaps using Linq or IEnumerable which I've been unable to figure anything out which could do this.
       I do have some copy and pasted code which I don't understand how it works that I am using which I would guess could be altered for doing something like this but I can't find information that provides how the code works.  Or even if I did
    maybe I can't understand it. Like the code below which is extremely fast.
       Dim strArray() As String = Array.ConvertAll(Of Integer, String)(BmpComparisonDict.Keys.ToArray, Function(x) x.ToString())
    La vida loca

    Monkeyboy,
    That was quite a bit to read, but still a bit unclear. Could you put a specific list of goals/questions, asked in the smallest possible form?
    It seems like either you're making a program that monitors activity on your computer, or you're writing some kind of remote pc app.
    When you do get your bytes from using lockbits, keep in mind all the files header info would be lost. I think retaining the header info is worth the extra bytes.
    The other, thing: I'm not sure if you're taking 32bpp screen shots, but also keep in mind that the "whole desktop" is the final destination for blended graphics, if that makes sense. What I mean is that there is no need to capture an "alpha"
    channel for a desktop screenshot, as alpha would always be 255, this could save you 1 byte per pixel captured... Theres nothing "behind" the desktop, therefore no alpha, and every window shown above the desktop is already blended. I suggest using
    24Bpp for a full screen capture.
    Your X,Y information for the mouse could be stored as UINT16, this would save you a measly 2 bytes per location update/save.
    When you update your byte arrays, maybe you can turn the array into a stream and write to whatever index, however many bytes, that should prevent a "Shift" of bytes, and instead overwrite any bytes that "get in the way".
    ex
    Dim example As String = "This is an example."
    Dim insertString As String = "was"
    Dim insertBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(insertString)
    Dim bytes As Byte() = System.Text.Encoding.ASCII.GetBytes(example)
    Dim modifiedBytes As Byte() = {}
    Using ms As New System.IO.MemoryStream(bytes)
    ms.Position = 5
    ms.Write(insertBytes, 0, 3)
    modifiedBytes = ms.ToArray
    End Using
    Dim newString As String = System.Text.Encoding.ASCII.GetString(modifiedBytes)
    'Notice how below there isn't the word "is" anymore, and that there isn't a
    'space.
    'This demonstrates that you overwrite existing data, versus shifting everything to
    'the right.
    'Returns: This wasan example.
    MsgBox(newString)
    “If you want something you've never had, you need to do something you've never done.”
    Don't forget to mark
    helpful posts and answers
    ! Answer an interesting question? Write a
    new article
    about it! My Articles
    *This post does not reflect the opinion of Microsoft, or its employees.
    Well it's too much to read. I was really tired when I wrote it. Even the below is too much to read but perhaps gets the point across of what I would like to do which I think
    Joel Engineer may have answered but I'm not sure. As I'm still too tired to understand that yet and research what he said in order to figure it out yet.
    But maybe the code below can provide the concept of the operation with the comments in it. But seeing as how I'm still tired it may be confused.
    Option Strict On
    Imports System.Windows.Forms
    Imports System.IO
    Imports System.IO.Compression
    Imports System.Drawing.Imaging
    Imports System.Runtime.InteropServices
    Public Class Form1
    Dim Bmp1Bytes As New List(Of Byte)
    Dim Bmp1BytesCompressed As New List(Of Byte)
    Dim Bmp2Bytes As New List(Of Byte)
    Dim BmpComparisonDict As New Dictionary(Of Integer, Byte)
    Dim BmpDifferenceIndexesCompressed As New List(Of Byte)
    Dim BmpDifferenceBytesCompressed As New List(Of Byte)
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    SomeSub()
    End Sub
    Private Sub SomeSub()
    ' Pretend this code is in UDP Client app. A screen capture is performed of the desktop. Takes about 90 milliseconds.
    Bmp1Bytes.Clear()
    Using BMP1 As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
    Using g1 As Graphics = Graphics.FromImage(BMP1)
    g1.CopyFromScreen(0, 0, 0, 0, BMP1.Size)
    Cursor.Draw(g1, New Rectangle(Cursor.Position.X, Cursor.Position.Y, Cursor.Size.Width, Cursor.Size.Height))
    Using MS As New MemoryStream
    BMP1.Save(MS, System.Drawing.Imaging.ImageFormat.Bmp)
    Bmp1Bytes.AddRange(MS.ToArray)
    End Using
    End Using
    End Using
    Bmp1BytesCompressed.AddRange(Compress(Bmp1Bytes.ToArray))
    ' UDP Client app sends Bmp1BytesCompressed.ToArray to UDP Server which is the entire image of the desktop that the UDP
    ' Client is on. This image takes awhile to send since compressed it is about 177000 bytes from over 4000000 bytes.
    ' I will be using different code just to get the bytes from the actual Bitmap in the future. That is not important for now.
    ' Pretend the UDP Server has received the bytes, decompressed the array received into a List(Of Byte) and is displaying
    ' the image of the UDP Clients desktop in a PictureBox.
    ' Now the image on the UDP Clients desktop changes due to the mouse cursor moving as an example. Therefore a new Bitmap
    ' is created from a screen capture. This takes about 90 milliseconds.
    Bmp2Bytes.Clear()
    Using BMP2 As New Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
    Using g1 As Graphics = Graphics.FromImage(BMP2)
    g1.CopyFromScreen(0, 0, 0, 0, BMP2.Size)
    Cursor.Draw(g1, New Rectangle(Cursor.Position.X, Cursor.Position.Y, Cursor.Size.Width, Cursor.Size.Height))
    Using MS As New MemoryStream
    BMP2.Save(MS, System.Drawing.Imaging.ImageFormat.Bmp)
    Bmp2Bytes.AddRange(MS.ToArray)
    End Using
    End Using
    End Using
    ' Now I have the original images bytes in Bmp1Bytes and the new images bytes in Bmp2Bytes on the UDP Client. But I don't
    ' want to send all of the bytes in Bmp2Bytes to the UDP Server. Just the indexes of and the bytes that are different in
    ' Bmp2Bytes from Bmp1Bytes.
    ' This takes less than 100 milliseconds for what I've tested so far where over 500000 bytes in Bmp2Bytes are different
    ' than the bytes in Bmp1Bytes. Usually that amount would be much less. But during testing I was displaying the image
    ' from Bmp1 bytes in a PictureBox so a large amount of data would change between the first screen shot, the PictureBox
    ' then displaying an image on the same PC and then the second screen shot.
    BmpComparisonDict.Clear()
    For i = 0 To Bmp1Bytes.Count - 1
    If Bmp1Bytes(i) <> Bmp2Bytes(i) Then
    BmpComparisonDict.Add(i, Bmp2Bytes(i))
    End If
    Next
    ' So now I have all the difference bytes and their indexes from Bmp2Bytes in the BmpComparisonDict. So I compress
    ' the indexes into on List and the Bytes into another List.
    BmpDifferenceIndexesCompressed.Clear()
    BmpDifferenceBytesCompressed.Clear()
    BmpDifferenceIndexesCompressed.AddRange(Compress(BmpComparisonDict.Keys.SelectMany(Function(d) BitConverter.GetBytes(d)).ToArray()))
    BmpDifferenceBytesCompressed.AddRange(Compress(BmpComparisonDict.Values.ToArray))
    ' Now pretend the UDP Client has sent both those arrays to the UDP Server which has added both decompressed arrays
    ' to a Dictionary(Of Integer, Byte). And the server has the original image decompressed bytes received in a List
    ' called Bmp1Bytes also.
    ' This is where I am stuck. The UDP Server has the Dictionary. That part was fast. However there is no
    ' fast method I have found for creating a new List(Of Byte) where bytes in the originally received List(Of Byte) that
    ' do not have to be altered are placed into a new List(Of Byte) except for the indexes listed in the
    ' Dictionary(Of Integer, Byte) that need to be placed into the appropriate index locations of the new List(Of Byte).
    ' The below example for doing so is exceptionally slow. Pretend UpdateDictionary has all of the decompressed indexes
    ' and bytes received by the UDP Server for the update contained within it.
    Dim UpdateDictionary As New Dictionary(Of Integer, Byte)
    Dim UpdatedBytes As New List(Of Byte)
    Dim Counter As Integer = 0
    For i = 0 To Bmp1Bytes.Count - 1
    If i = UpdateDictionary.Keys(Counter) Then ' Provides the index contained in the Keys for the Dictionary
    UpdatedBytes.Add(UpdateDictionary.Values(Counter))
    Counter += 1
    If Counter > UpdateDictionary.Count - 1 Then Counter = 0
    Else
    UpdatedBytes.Add(Bmp1Bytes(i))
    End If
    Next
    ' So what I'm trying to do is find an extremely fast method for performing something similar to what the
    ' above operation performs.
    End Sub
    Private Function Compress(BytesToCompress() As Byte) As List(Of Byte)
    Dim BytesCompressed As New List(Of Byte)
    Using compressedStream = New MemoryStream()
    Using zipStream = New GZipStream(compressedStream, CompressionMode.Compress)
    zipStream.Write(BytesToCompress, 0, BytesToCompress.Count)
    zipStream.Close()
    BytesCompressed.AddRange(compressedStream.ToArray)
    End Using
    End Using
    Return BytesCompressed
    End Function
    Private Function Decompress(BytesToDecompress() As Byte) As List(Of Byte)
    Dim BytesDecompressed As New List(Of Byte)
    Using DecompressedStream = New MemoryStream()
    Using zipStream = New GZipStream(DecompressedStream, CompressionMode.Decompress)
    zipStream.Write(BytesToDecompress, 0, BytesToDecompress.Count)
    zipStream.Close()
    BytesDecompressed.AddRange(DecompressedStream.ToArray)
    End Using
    End Using
    Return BytesDecompressed
    End Function
    End Class
    La vida loca

Maybe you are looking for

  • Power Supply Temperatures Running Hot! Mac Pro shuts down.

    Hello, First I will give machine/hardware specs of interest: 2 x 3 GHz Quad-Core Intel Xeon (pre 2009) 8 GB 800 MHz DDR2 FB-DIMM NVIDIA Quadro FX 5600 (running 2 displays) Apple RAID Card/Controller SMC Version: 1.25f4 *venting dimensions around comp

  • Can I summarize data from a line item ODS into a higher summary level?

    Hello friends, 1) Can I summarize data from a line item ODS into a high summary level and store the results into another ODS?  If so, can you discuss the approach at a high level...i.e. whether or not a start up routine is needed? 2) Once data is sto

  • Problems with class MdmDimension

    Hello, I've created some dimensions and cubes using cwm2 packages, in Oracle 9i. Now I'm trying to use these objects in a j2ee aplication using olap api. My problem is: when I try to display the properties (display_name, plural_description, descripti

  • Tips for new entrant in the world of JAVA

    Hi Guys, I wanted to get OCJAP 7 ceritfied and as I am new to java i spend two months reading different kinds of tutorials sites for ex: javatpoint, tutorialspoint etc.,. and gave some mock exams also on it and last wednesday i wrote the certificatio

  • Stopping Photo in Ken Burns Fade

    I am creating a photo montage in IMovie 10. I like the Ken Burns effect, but want the photo to stop for a second or two before the fade. By the time the effect gets to the closeup, it goes right into the next fade. Help!