11.1.0.6 Spatial Performance Bug ?

Hi All,
Is there a known issue with performance of SDO_ANYINTERACT on 11.1.0.6 ?
I have 2 tables:
MAP_LAKES_US with 16 rows and MAP_PARKFACILITY_SF with 162 rows
The following query:
SELECT count( a1.POLYGON_ID )
FROM MAP_LAKES_US a1, MAP_PARKFACILITY_SF a2
WHERE SDO_ANYINTERACT(A1.GEOMETRY,
SDO_GEOMETRY(2003, 8307, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY( -122.96677479856513, 37.508862, -122.96677479856513, 37.9221695, -121.89290520143487, 37.9221695, -121.89290520143487, 37.508862, -122.96677479856513, 37.508862 ) )
)='TRUE'
AND SDO_ANYINTERACT(a1.GEOMETRY, a2.GEOMETRY)='TRUE';
Takes 17minutes and 50 seconds on 11.1.0.6 (10minutes 53 seconds on a higher spec machine) ... But only takes 7 seconds on 11.1.0.7 on the same spec machine as the 1st machine.
Without the 2nd where clause the query executes instantly on all machines.
cheers,
Ro

Hi Siva,
Sorry this took so long.... Here are the explain pans:
11.1.0.6 Database
PLAN_TABLE_OUTPUT
Plan hash value: 3455258727
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 102 | 8 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 102 | | |
| 2 | NESTED LOOPS | | 1 | 102 | 8 (0)| 00:00:01 |
| 3 | TABLE ACCESS BY INDEX ROWID| MAP_LAKES_US | 1 | 42 | 3 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | SIDX_MAP_LAKES_US | | | | |
|* 5 | TABLE ACCESS FULL | MAP_PARKFACILITY_SF | 2 | 120 | 5 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
4 - access("MDSYS"."SDO_ANYINTERACT"("A1"."GEOMETRY","MDSYS"."SDO_GEOMETRY"(2003,8307,NULL
,"SDO_ELEM_INFO_ARRAY"(1,1003,1),"SDO_ORDINATE_ARRAY"((-122.96677479856513),37.508862,(-122.9
6677479856513),37.9221695,(-121.89290520143487),37.9221695,(-121.89290520143487),37.508862,(-
122.96677479856513),37.508862)))='TRUE')
5 - filter("MDSYS"."SDO_ANYINTERACT"("A1"."GEOMETRY","A2"."GEOMETRY")='TRUE')
11.1.0.7 Database
PLAN_TABLE_OUTPUT
Plan hash value: 3455258727
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 7658 | 8 (0)| 00:00:01 |
| 1 | SORT AGGREGATE | | 1 | 7658 | | |
| 2 | NESTED LOOPS | | 1 | 7658 | 8 (0)| 00:00:01 |
| 3 | TABLE ACCESS BY INDEX ROWID| MAP_LAKES_US | 1 | 3835 | 3 (0)| 00:00:01 |
|* 4 | DOMAIN INDEX | SIDX_MAP_LAKES_US | | | | |
|* 5 | TABLE ACCESS FULL | MAP_PARKFACILITY_SF | 2 | 7646 | 5 (0)| 00:00:01 |
PLAN_TABLE_OUTPUT
Predicate Information (identified by operation id):
4 - access("MDSYS"."SDO_ANYINTERACT"("A1"."GEOMETRY","MDSYS"."SDO_GEOMETRY"(2003,8307,NULL
,"SDO_ELEM_INFO_ARRAY"(1,1003,1),"SDO_ORDINATE_ARRAY"((-122.96677479856513),37.508862,(-122.9
6677479856513),37.9221695,(-121.89290520143487),37.9221695,(-121.89290520143487),37.508862,(-
122.96677479856513),37.508862)))='TRUE')
5 - filter("MDSYS"."SDO_ANYINTERACT"("A1"."GEOMETRY","A2"."GEOMETRY")='TRUE')
PLAN_TABLE_OUTPUT
Note
- dynamic sampling used for this statement
The only difference I can see his the values in the Bytes column, I'm not sure what can cause these differences.
As an aside, I've discovered that if I replace the order of the parameters in the final SDO_ANYINTERACT clause (placing the larger dataset a2 first) then the query executes in 0.8 seconds on both databases.
(This also has the effect of changing the full table scan in step 5 to a domain index lookup)
Unfortuantly, since the query is generated from code and can be different every time, this is not a simple code change to fix.
Thanks,
Ronan

Similar Messages

  • [BUG] JDeveloper performance bug

    Hi,
    I am working on ADF faces and hit a performance bug:
    When displaying the "design view" of a jsf page, Jdeveloper hangs for more than 15 minutes (thats why it is a bug, not a simple issue), then it displays it correctly.
    Host is a P4 3Ghz with 2GB RAM.
    Configuration:
    ADF Business Components     10.1.3.36.73
    CVS Version     Internal to Oracle JDeveloper 10g (client-only)
    Java™ Platform     1.5.0_05
    Oracle IDE     10.1.3.36.73
    Struts Modeler Version     10.1.3.36.73
    UML Modelers Version     10.1.3.37.26
    Versioning Support     10.1.3.36.73

    Hi,
    just a suggestion... Please control whether you run another process in background. In windows op. sys. look at task manager and control processer usage and memory usage!? is there any weird resource consuming!? Also control your disk fragmentation!? Is your hard disk fragmented too much!?
    Also, in the beginning, my designer in jdeveloper was not shown because of my locale setting. My locale setting was Turkish (tr) and user interface designer didn't show the user interface components during page design. After I changed locale to en_us, the designer shows the user interface designer properly. just check it!
    I couldn't help any more according to your feed back :-)
    best regards...
    --barisk                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Oracle Spatial Performance with 10-20.000 users

    Does anyone have any experience when Oracle Spatial is used with say 20.000 concurrent users. I am not interested in MapViewer response time, but lets say there is:
    - an app using 800 different tables each having an sdo_geometry column
    - the app is configured with different tables visible on different view scales
    - let's say an average of 40-50 tables is visible at any given time
    - some tables will have only a few records, while other can hold millions.
    - there is no client side caching
    - clients can zoom in/out pan.
    Anwers I am interested in:
    - What sort of server would be required
    - How can Oracle serve all that data (each Refresh renders the map and retrieves the data over the wire as there is no client side caching).
    - What sort of network infrastructure would be required.
    - Can clients connect to different servers and hence use load balancing or does Oracle have an automatic mechanism for that?
    Thanks in advance,
    Patrick

    Patrick, et al.
    There are lots of things one can do to improve performance in mapping environments because of a lot of the visualisation is based on "background" or read-only data. Here are some "tips":
    1. Spatially sort read-only data.
    This tip makes sure that data that is close to each other in space are next to each other on disk! Dan gave a good suggestion when he referenced Chapter 14, "Reorganize the Table Data to Minimize I/O" pp 580- 582, Pro Oracle Spatial. But just as easily one can create a table as select ... where sdo_filter() where the filtering object is an optimized rectangle across the whole of the dataset. (This is quite quick on 10g and above but much slower on earlier releases.)
    When implementing this make sure that the created table is created such that its blocks are next to each other in the tablespace. (Consider tablespace defragmentation beforehand.) Also, if the data is READ ONLY set the PCTFREE to 0 in order to pack the data up into as small a number of blocks as possible.
    2. Generalise data
    Rendering spatial data can be expensive where the data is geometrically detailed (many vertices) esp where the data is being visualised at smaller scales than it was captured at. So, if your "zoom thresholds" allow 1:10,000 data to be used at 1:100,000 then you are going to have problems. Consider pre-generalising the data (see sdo_util.simplify) before deployment. You can add multiple columns to your base table to hold this data. Be careful with polygon data because generalising polygons that share boundaries will create gaps etc as the data is more generalised. Often it is better to export the data to a GIS which can maintain the boundary relationships when generalising (say via topological relationships).
    Oracle's MapViewer has excellent on-the-fly generalisation but here one needs to be careful. Application tier caching (cf Bryan's comments) can help here a lot.
    3. Don't draw data that is sub-pixel.
    As one zooms out objects become smaller and smaller until they reach a point where the whole object can be drawn within a single pixel. If you have control over your map visualisation application you might want to consider setting the SDO_FILTER parameter "min_resolution" flag dynamically so that its value is the same as the number of meters / pixel (eg min_resolution=10). If this is set Oracle Spatial will only include spatial objects in the returned search set if one side of a geometry's MBR is greater than or equal to this value. Thus any geometries smaller than a pixel will not be returned. Very useful for large scale data being drawn at small scales and for which no selection (eg identify) is required. With Oracle MapViewer this behaviour can be set via the generalized_pixels parameter.
    3. SDO_TOLERANCE, Clean Data
    If you are querying data other than via MBR (eg find all land parcels that touch each other) then make sure that your sdo_tolerance values are appropriate. I have seen sites where data captured to 1cm had an sdo_tolerance value set to a millionth of a meter!
    A corollary to this is make sure that all your data passes validation at the chosen sdo_tolerance value before deploying to visualisation. Run sdo_geom.validate_geometry()/validate_layer()...
    4. Rtree Spatial Indexing
    At 10g and above lots of great work went in to the RTree indexing. So, make sure you are using RTrees and not QuadTrees. Also, many GIS applications create sub-optimal RTrees by not using the additional parameters available at 10g and above.
    4.1 If your table/column sdo_geometry data contains only points, lines or polygons then let the RTree indexer know (via layer_gtype) as it can implement certain optimizations based on this knowledge.
    4.2 With 10g you can set the RTree's spatial index data block use via sdo_pct_free. Consider setting this parameter to 0 if the table/column sdo_geometry data is read only.
    4.3 If a table/column is in high demand (eg it is the most commonly used table in all visualisations) you can consider loading (a part of) the RTree index into memory. Now, with the RTree indexing, the sdo_non_leaf_tbl=true parameter will split the RTree index into its leaf (contains actual rowid reference) and non-leaf (the tree built on the leaves) components. Most RTrees are built without this so only the MDRT*** secondary tables are built. But if sdo_non_leaf_tbl is set to true you will see the creation of an additional MDNT*** secondary table (for the non_leaf part of the rtree index). Now, if appropriate, the non_leaf table can be loaded into memory via the following:
    ALTER TABLE MDNT*** STORAGE(BUFFER_AREA KEEP);
    This is NOT a general panacea for all performance problems. One should investigate other options before embarking on this (cf Tom Kyte's books such as Expert Oracle Database Architecture, 9i and 10g Programming Techniques and Solutions.)
    4.4 Don't forget to check your spatial index data quality regularly. Because many sites use GIS package GUI tools to create tables, load data and index them, there is a real tendency to not check what they have done or regularly monitor the objects. Check the SDO_RTREE_QUALITY column in USER_SDO_INDEX_METADATA and look for indexes with an SDO_RTREE_QUALITY setting that is > 2. If > 2 consider rebuilding or recreating the index.
    5. The rendering engine.
    Whatever rendering engine one uses make sure you try and understand fully what it can and cannot do. AutoDesk's MapGuide is an excellent product but I have seen it simply cache table/column data and never dynamically access it. Also, I have been at one site which was running Deegree and MapViewer and MapViewer was so fast in comparison to Deegree that I was called in to find out why. I discovered that Deegree was using SDO_RELATE(... ANYINTERACT ...) for all MBR queries while MapViewer was using SDO_FILTER. Just this difference was causing some queries to perform at < 10% of the speed of MapViewer!!!!
    6. Consider "denormalising" data
    There is an old adage in databases that is "normalise for edit, denormalise for performance". When we load spatial data we often get it from suppliers in a fairly flat or normalised form. In consort with spatial sorting, consider denormalising the data via aggregations based on a rendering attribute and some sort of spatial unit. For example, if you have 1 million points stored as single points in SDO_GEOMETRY.SDO_POINT which you want to render by a single attribute containing 20 values, consider aggregating the data using this attribute AND some sort of spatial BUCKET or BIN. So, consider using SDO_AGGR_UNION coupled with Spatial Analysis and Mining package functions to GROUP the data BY <<column_name>> and a set of spatial extents.
    6. Tablespace use
    Finally, talk to your DBA in order to find out how the oracle database's physical and logical storage is organised. Is a SAN being used or SAME arranged disk arrays? Knowing this you can organise your spatial data and indexes using more effective and efficient methods that will ensure greater scalability.
    7. Network fetch
    If your rendering engine (app server) and database are on separate machines you need to investigate what sort of fetch sizes are being used when returning data from queries to the middle-tier. Fetch sizes for attribute only data rows and rows containing spatial data can be, and normally are, radically different. Accepting the default settings for these sizes could be killing you (as could the sort_area_size of the Oracle session the application server has created on the database). For example I have been informed that MapInfo Pro uses a fixed value of 25 records per fetch when communicating with Oracle. I have done some testing to show that this value can be too small for certain types of spatial data. SQL Developer's GeoRaptor uses 100 which is generally better (but this one can modify this). Most programmers accept defaults for network properties when programming in ADO/ODBC/OLEDB/JDBC: just be careful as to what is being set here. (This is one of the great strengths of ArcSDE: its TCP/IP network transport is well written, tuneable and very efficient.)
    8. Physical Format
    Finally, while Oracle's excellent MapViewer requires data its spatial data to be in Oracle, other commercial rendering engines do not. So, consider using alternate, physical file formats that are more optimal for your rendering engine. For example, Google Earth Enterprise "compiles" all the source data into an optimal format which the server then serves to Google Earth Enterprise clients. Similarly, a shapefile on local disk to the application server (with spatial indexing) may be faster that storing the data back in Oracle on a database server that is being shared with other business databases (eg Oracle financials). If you don't like this approach and want to use Oracle only consider using a dedicated Oracle XE on the application server for the data that is read only and used in most of your generated maps eg contour or drainage data.
    Just some things to think about.
    regards
    Simon

  • Spatial Performance Problem

    I'm new to GIS development, and hereby got a performance comparison.
    Techs adopted time consumed to display the whole map in one time
    ESRI SDE + Oracle Spatial 6 Mins
    ESRI SDE + Oracle 1 Min 20 Sec
    ESRI SDE + SQLSERVER 50 Sec
    ESRI SDE + Shapefile 30 Sec
    Shape file size 550M, totally 480k rows
    Can anyone tell me why SDE + Spatial works so low performance than SDE + SQL SERVER, and what can I do to improve the performance when adopt just SDE + ORACLE(just for storage like normal RDBMS).
    I don't think Oracle will work worse than SQL Server in SDE environment. But what should I pay attention to during using Oracle to store map data for SDE.
    Is that not a normal scense to use SDE with Oracle Spatial? Why I got so bad performance? I just migrate data from Shapefile to SDO_GEOMETRY type and add indexes as Spatial required.
    Any one can leave your comment if you know something about this.
    Thanks in advance.

    Here is a partitioning example as promised. Note an upcoming talk at Oracle Open World will show how to extend this model to include spatial partitioning, where we will describe some really important optimizations that will bring scalability (already a differentiator) to new levels. After Oracle Open World we'll post that information to OTN as well (please come talk to us if you happen to go).
    -- First, remove table partition_sales if it exists
    drop table partition_sales;
    -- Create table partition_sales. This table is partitioned
    -- by date range, breaking each year into 4 quarters.
    -- What users see is a single table called partition_sales
    -- but in reality there is one smaller table created for
    -- each partition
    -- For simplicity we are loading all partitions into the same
    -- tablespace. Most often they are loaded into separate tablespaces
    -- for performance, scalability, and manageability reasons
    CREATE TABLE partition_sales
    ( customer_id number,
    sale_date date,
    sale_amount number(10,2),
    geom mdsys.sdo_geometry
    PARTITION BY RANGE (sale_date)
    (PARTITION BEFORE_2003
    VALUES LESS THAN (TO_DATE('01-JAN-2003','DD-MON-YYYY')),
    PARTITION Q1_2003 VALUES LESS THAN (TO_DATE('01-APR-2003','DD-MON-YYYY')),
    PARTITION Q2_2003 VALUES LESS THAN (TO_DATE('01-JUL-2003','DD-MON-YYYY')),
    PARTITION Q3_2003 VALUES LESS THAN (TO_DATE('01-OCT-2003','DD-MON-YYYY')),
    PARTITION Q4_2003 VALUES LESS THAN (TO_DATE('01-JAN-2004','DD-MON-YYYY')),
    PARTITION Q1_2004 VALUES LESS THAN (TO_DATE('01-APR-2004','DD-MON-YYYY')),
    PARTITION Q2_2004 VALUES LESS THAN (TO_DATE('01-JUL-2004','DD-MON-YYYY')),
    PARTITION Q3_2004 VALUES LESS THAN (TO_DATE('01-OCT-2004','DD-MON-YYYY')),
    PARTITION Q4_2004 VALUES LESS THAN (TO_DATE('01-JAN-2005','DD-MON-YYYY')),
    PARTITION AFTER_2004
    VALUES LESS THAN (MAXVALUE));
    -- Each of these inserts goes into a separate partition.
    -- Although there are only 9 rows inserted, each into a separate
    -- partition, if you had 50 million rows they would be divided into
    -- smaller, more manageable pieces
    insert into partition_sales values (61243, '31-DEC-2002', 18764.23,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-73.943849, 40.66980, NULL), NULL, NULL) );
    insert into partition_sales values (4576, '15-JAN-2003', 27797.05,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-71.017892, 42.336029, NULL), NULL, NULL) );
    insert into partition_sales values (1161, '22-MAY-2003', 16222.50,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-76.610616, 39.30080, NULL), NULL, NULL) );
    insert into partition_sales values (55033, '09-SEP-2003', 1211.33,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-77.016167, 38.90505, NULL), NULL, NULL) );
    insert into partition_sales values (768, '15-DEC-2003', 84397.61,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-73.943851, 40.66975, NULL), NULL, NULL) );
    insert into partition_sales values (61243, '05-JAN-2004', 21764.26,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-73.943849, 40.66980, NULL), NULL, NULL) );
    insert into partition_sales values (6474, '17-JUN-2004', 76411.81,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-85.256956, 35.066209, NULL), NULL, NULL) );
    insert into partition_sales values (505, '27-JUL-2004', 104100.89,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-74.173245, 40.7241, NULL), NULL, NULL) );
    insert into partition_sales values (9151, '11-OCT-2004', 44298.66,
    mdsys.sdo_geometry(2001, 8307,
    mdsys.sdo_point_type(-79.976702, 40.43920, NULL), NULL, NULL) );
    commit;
    -- Let's make sure what we thought happened actually did happen
    -- The following allows us to see how many rows are stored in each partition
    exec dbms_stats.gather_table_stats('SCOTT','PARTITION_SALES');
    select partition_name,num_rows
    from user_tab_partitions
    where table_name='PARTITION_SALES';
    -- Now the data is loaded, we can spatially index it
    -- First, insert into user_sdo_geom_metadata
    delete from user_sdo_geom_metadata where table_name = 'PARTITION_SALES'
    and column_name = 'GEOM';
    insert into user_sdo_geom_metadata values ('PARTITION_SALES', 'GEOM',
    mdsys.sdo_dim_array (
    mdsys.sdo_dim_element ('LONG', -180, 180, 1),
    mdsys.sdo_dim_element ('LAT', -90, 90, 1)),
    8307);
    -- Now create the index. Note the keyword local is used
    -- which creates a separate index for each partition
    -- Because this example is simple, we didn't show storage
    -- of each spatial index partition in a separate tablespace,
    -- which is the common usage, again for performance, scalability,
    -- and manageability.
    drop index partition_sales_sidx;
    create index partition_sales_sidx on partition_sales (geom)
    indextype is mdsys.spatial_index parameters ('layer_gtype=point')
    local;
    -- Any query that uses the partition key (the date) will only search the
    -- partition associated with that date:
    select customer_id, sale_amount
    from partition_sales
    where sale_date = '17-JUN-2004'
    and sdo_relate(geom,
    mdsys.sdo_geometry(2003, 8307, null, mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(-86,34, -85,34, -85,36, -86,36, -86,34)),
    'mask=anyinteract querytype=window') = 'TRUE';
    -- The previous query only touched a single partition.
    -- You don't have to specify the partition key, though.
    -- All partitions can be searched if required. To speed up
    -- these kinds of queries, you can search all partitions in
    -- parallel by specifying the keywork parallel in the
    -- create index statement, or altering the index
    alter index partition_sales_sidx parallel 4;
    -- No date specified in this query, so all partitions may be searched
    select customer_id, sale_amount, sale_date
    from partition_sales
    where sdo_relate(geom,
    mdsys.sdo_geometry(2003, 8307, null, mdsys.sdo_elem_info_array(1,1003,1),
    mdsys.sdo_ordinate_array(-75,38, -70,38, -70,45, -75,45, -75,38)),
    'mask=anyinteract querytype=window') = 'TRUE';

  • Spatial Performance with join

    I have a Oracle Spatial table with 3.5 million rows plus another auxillary table with 3.5 million rows. A query over these two tables joined returns a full result (250 rows) based on one to one join - here's an example:
    Select count(*)
    from F, N
    where F.id = n.id and (F.GEOM,mdsys.sdo_geometry (2003,8307, null, mdsys.sdo_elem_info_array (1,1003,1), mdsys.sdo_ordinate_array(-120.0,49.5,-119.0,49.5,-119.0,60.35,-120.0,60.35,-120.0,49.5)),
    'mask= ANYINTERACT querytype=WINDOW') = 'TRUE') AND N.PNUM = '4';
    It takes an average of 35 seconds to get the full result set back. I've gathered statistics, tweaked memory parameters and this is the best I can get. Does anyone have any suggestions?

    This is an interesting problem. It looks like Oracle is doing the right thing for each of the table accesses - use the index and fetch by rowid.
    The only thing you have to play with if you don't go to materialized views or temp tables is how the results of the two table queries are joined.
    You don't have a lot of options. Hash join seems to be slow, but you don't know if it is faster or slower compared with nested loops or merge join.
    I'd compare what you have done with something like the following to test nested loops:
    select /*+ no_merge use_nl (f1,n1) */ count(*)
    from
    (select id
    from f
    where sdo_anyinteract ( F.GEOM,
    sdo_geometry (2003,8307, null, sdo_elem_info_array (1,1003,1),
    sdo_ordinate_array (-120.0,49.5,-119.0,49.5,-119.0,60.35,
    -120.0,60.35,-120.0,49.5))) = 'TRUE') f1,
    (select id
    from n
    where n.pnum='4') n1
    where f1.id=n1.id ;
    and presort with a merge join hint to see how it performs:
    select /*+ no_merge use_merge (f1,n1) */ count(*)
    from
    (select id
    from f
    where sdo_anyinteract ( F.GEOM,
    sdo_geometry (2003,8307, null, sdo_elem_info_array (1,1003,1),
    sdo_ordinate_array (-120.0,49.5,-119.0,49.5,-119.0,60.35,
    -120.0,60.35,-120.0,49.5))) = 'TRUE'
    order by id) f1,
    (select id
    from n
    where n.pnum='4'
    order by id) n1
    where f1.id=n1.id ;
    It might be that you already have the best Oracle can do, but I'd be curious to know how you make out.
    Dan Abugov
    VP Software Support and Services
    Acquis Inc.

  • CopyPixles() performance: bug or feature ?

    As anyone who has tried, knows that the performance of copyPixels/Blitting is unacceptably slow under the current version of PFI, which is a shame as most high-end flash games use blitting for their rendering.
    However its not clear if this is a Bug, that can be expected to be fixed in the next version, as the current one out is still a 'preview 2' not a final, or a permanent feature of how the PFI conversion will impact projects in all future versions as well.
    I have my doubts, as i *Think* its NOT actually copyPixels() thats causing the problem, as in my test if our game is getting about 7FPS with about 150 copyPixels() operations per frame.
    When I've cut that down to 15 copyPixels/frame, its still only 8FPS! I think its actually the fact that we have a new 480x320 BitmapData filled every frame and uploaded to the GPU/stored in the Memory. So even if just a blank 'canvas' bitmapdata gets filled with a flat color it could be the same.
    I tried setting the export to CPU, and even explicitly setting the bitmapdata/Movieclip to cacheAsBitmap = false but it didn't improve the performance.
    So my question is obvious, is this  a 'normal' behavior? Or should we expect this to be fixed in the next version?
    I can imagine either way, as an architecture that relies on the GPU and assumes 3D applications might work differently to a PC, as in a 3D application you dont typically create/fill a new 480x320 Texture/Bitmapdata each frame, but have a singe set that you cache initially and never add anything new to that.
    Any Ideas ?
    Martin

    Colin: you are welcome to test, This is pasted into an FLA's first frame set to 30FPS. Some of the sections are commented out, you can enable them to test different aspects. I also recommend testing both CPU and GPU.
    The time Delta is calculated in both cases the same way
    and you will see a that the Timer class uses a LOT of CPU. Where as if you use ENTER_FRAME you will get better performance
                // Initial Variables
                var gameTimer:Timer;
                // FPS and Debug Variables
                var FPS :int = 30;
                var _lastTimeUpdated:int;
                var fpstextField:TextField;
                var memoryField:TextField;
                // display Object
                var _canvasBD:BitmapData;
                var _canvasBitmap:Bitmap;
                _canvasBD = new BitmapData(480,320,false,0x06b111);
                _canvasBitmap = new Bitmap(_canvasBD);
                addChild(_canvasBitmap)
                // Performance Monitoring text fields
                var debugLayer:Sprite;
                debugLayer = new  Sprite();
                addChild(debugLayer);
                fpstextField = new TextField()
                memoryField= new TextField()
                debugLayer.addChild(fpstextField);   
                debugLayer.addChild(memoryField);
                memoryField.textColor = 0xFF00CC;
                fpstextField.textColor = 0xFF00CC;
                fpstextField.width = 100;
                memoryField.width = 100;   
                memoryField.y = 75;
                fpstextField.y = 55;
                // Start Gameloop
                 gameTimer=new Timer(1000 / FPS);   
                _lastTimeUpdated = getTimer();  
                gameTimer.start();
                gameTimer.addEventListener(TimerEvent.TIMER, render, false, 0, true);
                 // If you use Enter Frame performance will be better
                //this.addEventListener(Event.ENTER_FRAME, render, false, 0, true);
    function render(e:TimerEvent):void  // e:Event):void // use this for ENTER_FRAME
    {    //trace("runing");
            // Render a flat color into a Bitmap. You can comment this out, so there is nothing on stage,
            // and still see poor performance when the timer is running
            var bitmapRect: Rectangle = new Rectangle (0, 0, 480, 320);
            _canvasBD.fillRect(bitmapRect, 0x06b111);
            // Calculate FPS and memory usage
            var currentTime:int = getTimer();
            var timeDeltaInSeconds:Number = (currentTime - _lastTimeUpdated) / 1000; 
            _lastTimeUpdated = currentTime;  
            var actualFPS:Number =  Math.round (1 / timeDeltaInSeconds );
            fpstextField.text = "FPS: " + actualFPS + " / " +  FPS;
            memoryField.text = "mem: " + Math.floor(System.totalMemory / (1024 * 1024) * 100) / 100;
        // Have an optional 2nd timer that does nothing other than running, to see performance degrade even further
        //var gameTimer2:Timer;
        //gameTimer2=new Timer(1000 / FPS);   
        //gameTimer2.start();
        //gameTimer2.addEventListener(TimerEvent.TIMER, doNothing, false, 0, true)
    //function doNothing(e:TimerEvent):void
    //{    //trace("run");
            // Render a flat color
    - This above does about 15 FPS, jumping to 29FPS. Its weird even if you disable the rendering the green block, it will still be bad, suggesting that its actually the timer that causes the performance problems
    In my book 24FPS is poor for a scrolling game, 30FPS+ is the minimum for something commercially acceptable ... You've seen the Unreal video I posted in the other thread, noone is going to tell me that if That is possible at 30FPS, then 24FPS ( in fact a lot less ), is the max Iphone 4 can do.

  • Spatial Performance

    'm building a system which stores Geographical data, and trying to use the spatial functions in the Oracle database. Amongst the tables there are:
    blpu - one row per property in the county, each row has a spatial point object indicating its position. Has 480,000 rows.
    lcc_boundary - one row per region in the county (parishes, wards, districts, etc.), each row has a spatial polygon indicating its boundary. Has 537 rows.
    Now, if I want to determine which parish (say) a given property is in, I do this:
    SELECT b.uprn,lb.name area
    FROM blpu b,osmm.lcc_boundary lb
    WHERE MDSYS.SDO_GEOM.RELATE(lb.geoloc,'CONTAINS',b.geometry, 0.005) = 'CONTAINS'
    AND lb.area_code = 'CPC'
    AND b.uprn = 100030723225
    So far so good - it comes back with the right answer - but it takes 1 second to do so. If I changed the last line to bring back 100 properties, it takes about 100 seconds. Clearly performance is going to be extremely sluggish when doing real queries on thousands of addresses.
    Is there anything I can do - e.g. indexes that can be built - that will speed up these spatial functions; or am I just going to have to "denormalise" the spatial data into an ordinary table that cross-references each row in blpu with the rows in lcc_boundaries that enclose it?
    I find it hard to believe that Oracle would be selling a product that's so unusably slow.
    This is on Oracle9i Enterprise Edition Release 9.2.0.6.0, btw.

    Feedback and progress so far...
    asturbcn: Yeah, I think that's what I know as a spatial index. I've built them on the relevant columns.
    Bryan: I'm building it on 9i 'cos that's what I've got. The "powers that be" here tend to be pretty cautious about database upgrades, so I dunno when the DB in question will go to 10g. Maybe I can use this issue as leverage, but I still need to get something going today.
    As noted, I already had spatial indexes, but not optimised for the polygon type. I've recreated them with that refinement added - thanks.
    Richard: I wouldn't normally consider area_code as a candidate for an index, as it only has a few distinct values, but I created one anyway.
    Dan: Applying all the above advice, and some I got locally, I've ended up with this statement:
    SELECT b.uprn,lb.name area
    FROM blpu b,osmm.lcc_boundary lb
    WHERE sdo_relate(lb.GEOLOC, b.geometry, 'mask=CONTAINS querytype=WINDOW') = 'TRUE'
    AND lb.area_code = 'CPC'
    AND b.uprn = 100030723225
    This runs about three times faster than my original one, the biggest improvement seeming to come from the use in SDO_RELATE instead of MDSYS.SDO_GEOM.RELATE (I tried adding Bryan's /*+ ordered */ hint, but that slowed the query to 1.5mins. A place to trust the optimiser, I think!).
    So that's a good result - but it's not yet good enough to be usable in my particular situation. I think I'm still going to use a batch job to create a conventional this-property-is-in-this-region lookup table, and populate it (and maintain it) using spatial functions. Since neither of the tables concerned change much, I think this will be a workable approach - the lookup table will in effect be a kind of spatial index. Maybe when we go to 10g I can investigate a pure spatial solution.
    Unless, of course, you know different...

  • Oracle Spatial performance question

    All,
    I am doing a performance test on Oracle 11g Spatial. I am simulating doing searches in 10 degree by 10 degree windows over 6M+ images, six arc minutes per side. Here is my spatial query construction:
    String intersectSQL = "SELECT A.name, A.GEOMETRY.Get_WKT() " +
    "FROM six_amin_polygons A " +
    "WHERE SDO_RELATE(A.GEOMETRY,?, " +
    "'mask=inside+coveredby+overlapbdyintersect')='TRUE'";
    where the question mark is replaced by the geometry structure of the search window. The results for the first few searches are fast, then the query times balloon very quickly. PostGIS/PostgreSQL performs these searches in an average time of 30 s per window.
    Here are the initial (first four rows) of Oracle Spatial results:
    area_idx area_name sql_query_time number_results
    0 S80.0W90.0 3890 10100
    1 S80.0W80.0 3124 10100
    2 S80.0W70.0 186484 10100
    3 S80.0W60.0 183077 10100
    Any ideas? Am I using the best mask for image/area intersection? Please advise.
    Thanks,
    Jeff

    With anyinteract you get
    inside+coveredby+overlapbdyintersect+touch
    since you are comparing polygons to polygons.
    Do you want polygons that touch the window geometry in the result ? Do you want all the geometries
    that have some kind of intersection with the window query ? Then you should use ANYINTERACT mask.
    siva

  • Skype Performance Bug under Windows 8 x64 / endles...

    Dear Developers,
    please get rid of an annoying bug under Windows 8 x64 - this bug exists since several versions and still not fixed.
    Summary:
    After a while - maybe associated with energy saving options - a thread in Skype is getting more and more CPU time, causes by a thread always starts with ntdll!RtlGetCurrentPeb+0xf (see att.) <- what does this thread actually?
    Results:
    Heavy CPU usage, slowly Skype response - missing Messages. Only Skype restarts helps.
    I will do more investigation if needed. Let me know.
    Update:
    The thread uninterruptedly reads from
    HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\MMDevices\Audio\Render\*
    Appears to a not catched endless loop?
    Attachments:
    2.PNG ‏19 KB
    3.PNG ‏89 KB

    rsbrux wrote:
    My Thinkpad originally came with Windows 7 Pro, but I have changed to Windows 8 in order to resolve problems with VSS.  OOB, both Windows 7 and Windows 8 gave me a "Desktop graphics performance" rating of 5.7.  Under Windows 7, upgrading to the latest Lenovo driver improved this to 6.1, leaving my HDD (at 5.9) as the limiting factor in performance.  Under Windows 8, however, replacing the Windows driver with the latest Lenovo driver has reduced "Desktop graphics performance" to 5.6!  What gives?
    P.S. I just discovered a Power Options advanced power setting "Intel Graphics Power Plan", which was set to "Maximum Battery Life" for both battery and plugged in.  I changed it to "Maximum Performance" when plugged in, but the Windows experience Index (WEI) for "Desktop graphics performance" remains a mer 5.8.
    After you changed the setting to "Maximum Performance" , did you run the WEI test again?

  • Yosemite performance bug for various online multiplayer games.

    Since I upgraded the new OS X YOSEMITE, i've been having problems that i've never gotten before. I usually play DotA 2 in an excellent performance and my FPS would be fine, but since the new update(YOSEMITE) there is a few problems that i have to face.
    1.The game keeps on dropping FPS
    2.Crashes on random moments but most likely at team fights.
    3.Audio bug that can go through apps like Skype.
    -It will make a laggy sound and it will effect the mic to become an echo.
    4.None of the community seems to take this as a serious matter.
    Can anyone at least tell me how to reduce the amount of lag? Or Can the staff fix this problem? I have not played DotA 2 for days because of this.

    Wi-FI connection drops
    Wi-Fi Problems in OS X Yosemite
    Wi-Fi Problems in OS X Yosemite (2)
    Wireless Diagnostics
    Also try turning off Bluetooth.
    Troubleshooting Wi-Fi issues in OS X
    Wireless Connection Problems - Fix
    Wireless Connection Problems - Fix (2)
    Wireless Connection Problems - Fix (3)
    Wireless Connection Problems - Fix (4)
    Performance Guide
    Why is my computer slow
    Why your Mac runs slower than it should
    Slow Mac After Mavericks
    Things you can do to resolve slowdowns  see post by Kappy

  • 11g: debug-redeploy performance bug

    I've been noticing performance degradation with long debugging sessions with frequent redeployments. Today I did some testing and I can confirm and reproduce the problem.
    Test scenario:
    1. Start Jdeveloper (and open our current application)
    2. Click on login.jspx and wait for web browser to open and show login screen.
    3. Goto 2.
    Results:
    as expected, the first time jdev first start wls, so startup time is a bit longer (1min 40s), next times are better (~50s). Until something very bad happens.
    In my case, the 7th and 8th times took 4min 30s and 6min 44s. In that time, java.exe wls process was using ~40% cpu and jdev ~10% (which means, together they used 100% of a single core).
    Observations:
    I was inspecting the processes with jvisualvm and noted that 7th and 8th times were the only two cases when number of classess in permGen used in wls decreased. In both cases PermGen was far from full, with more than 50M free.
    Interestingly, the 9th time took 45s and no class unloading occurred.

    Today I reproduced the problem using jrockit for both, jdeveloper and wls. On the 4th run, cpu usage went to 50% and I had to wait 3min 50s for the login screen, while normal times are in range of 50-60s (yes, it seems deployment with jrockit is a bit slower).
    Here is the log excerpt when the wait occurs:
    20.8.2009 *10:03:51* JpsApplicationLifecycleListener Migrate Application Credential Store
    WARNING: Overwriting credentials is allowed in application credential store migration with Weblogic server running in Development Mode and system property 'jps.app.credential.overwrite.allowed' set to true
    20.8.2009 *10:07:04* oracle.adf.mbean.share.connection.ConnectionsRuntimeMXBeanImpl getNonCachedConnectionsContext
    INFO: Registering Connection Runtime MBeanHaving such long waits every few deploy cycles practically means it makes more sense to kill and restart server each time, as less developer's time is wasted :-/

  • Performance bug observed in BaseCompose.finishComposeLine

    We were seeing some performance issues when editing documents and noticed that it was occurring in documents that had underlined text.  The issue was that any text line that contain underlined FlowLeafElements was getting extra Adornment Shapes added when the TextLine was reused during compose.
    The code in question begins in BaseCompose.finishComposeLine:
            protected function finishComposeLine(curLine:TextFlowLine, lineSlug:Rectangle):void
          curLine.createAdornments(_blockProgression,_curElement,_curElementStart);
    The issue is that createAdornments does not check if the TextFlowLine already had Adornment shapes (for drawing the underlines) before updating and then adds another "Shape" object.   The net effect is that the TextLine in the display list gets redundant Shapes and performance begins to suffer.
         private function updateAdornmentsOnBounds(line:TextFlowLine, blockProgression:String, spanBounds:Rectangle):void
              var tLine:TextLine = line.getTextLine();
              var selObj:Shape = new Shape();
              tLine.addChild(selObj);
    The problem was easy to reproduce once we better understood what was happening, every time we would see a compose happen for this line (e.g. hitting return above the line in question), more Shapes would be added.  When all that was really necessary was to move the TextLine.  Our fix was to change the line in 'finishComposeLine' to check if the curTextLine already had children, which implied that it had Adornments, and was being reused.
         //  Added check to determine if TextLine is being reused.  If the TextLine already has children
         //   it must be a reused line that is just being moved.   The children are the adornments used for underlines/strikethrough/etc...
         if (curTextLine.numChildren == 0)
              curLine.createAdornments(_blockProgression,_curElement,_curElementStart);
    Let me know if anything else is needed, or if I should go ahead a file a JIRA ticket for this.
    Thanks,
    Brett

    Hey, thanks for reporting that!  I'm seeing the same behavior on my end.  This could results in thousands of shapes being created in TextLine's for underline and strikethrough adornments.  Causes CPU and memory usage to skyrocket for longer textflows with lots of underlining/strikethrough...

  • IOS 8.1+ Performance Issue

    Hello,
    I encountered a serious performance bug in Adobe Air iOS application on devices running iOS 8.1 or later. Approximately in 1-2 minutes fps drops to 7 or lower without interacting with the app. This is very noticeable in the app. The app looks like frozen for about 0.5 seconds. The bug doesn't appear on every session.
    Devices tested: iPad Mini iOS 8.1.1, iPhone 6 iOS 8.2. iPod Touch 4 iOS 6 is working correctly.
    Air SDK versions: 15 and 17 tested.
    I can track the bug using Adobe Scout. There is a noticeable spike on frame time 1.16. Framerate drops to 7.0. The App spends much time on function Runtime overhead. Sometimes the top activity is Running AS3 attached to frame or Waiting For Next Frame instead of Runtime overhead.
    The bug can be reproduced on an empty application having a one bitmap on stage. Open the app and wait for two minutes and the bug should appear. If not, just close and relaunch the app.
    Bugbase link: Bug#3965160 - iOS 8.1+ Performance Issue
    Miska Savela

    Hi
    Id already activated Messages and entered the 6 digit code I was presented with into my iPhone. I can receive txt messages from non iOS users on my iMac and can reply to those messages.
    I just can't send a new message from scratch to a non iOS user :-s
    Thanks
    Baz

  • Deductions Report performance issue

    Has anyone encountered performance problems lately with the Deductions Report?
    We have a custom report that is a modified version of the seeded report, and we cannot run the report to completion since our last round of patching. Patches applied are listed below, and include YE Phase 2.
    We have not yet opened a TAR on this, because we'll need to gather some information internally first.
    Thanks,
    Carrie
    Year-end and year-start updates, as follows:
    Patches 5555555, 5555550, 5650846, and HR Global – 2006 Oracle Year-End Phase 2
    Patch 5573903 – Quantum 2.8.2, Quantum 2006 Upgrade
    Patches 5589335 (prerequisite) and 5511810 – EEO Patch
    Patch 5416623 – Unable to process Admin Life Events (Benefits)
    Carrie Hollack
    [email protected]

    We've hit the performance bug and logged an SR. We ran the shipped report and it chugged for 2 1/2 days then blew up on snapshot too old. If you can avoid that error then it fails with ORA-01722: invalid number. I defragged and analyzed the Payroll tables and indexes but it's not enough to help the bad code. I think part of the issue is that the report code just uses a generic /*+ RULE */ hint. Another part of the issue may be that NULLs in the payroll tables aren't properly accounted for in the code.
    The behavior of the 'RULE' hint seems to be dependent on what the Paryoll LOW_VOLUME parameter is set to. That is, with LOW_VOLUME=Y and small tables the 'RULE' hint might be fine, but in the real World with with LOW_VOLUME=YouGottaBeKidding it doesn't.
    The new Payroll Activity Report for the whole year has very good performance--it only took 4 hours in our environment--and it used to take days.
    Open an SR and ask to be attached to Bug 5742521.

  • 2.1 RC1 - Pure performance when Preferences.Worksheet."script path" is used

    When I fill out the "Select default path to look for scripts" text box on the Worksheet page in Preferences, I expirience very bad performance when I type in sql statements.
    If I clear the text box agian, I have normal performance.

    Bug already logged from duplicate posts from other users.
    -Turloch

Maybe you are looking for

  • Wired 802.1x with PEAP

    I have manage to get wired 802.1x working using Windows Active Directory as the database. With machine authentication, single-signon can be achieved. Setup: C3750 switch - Cisco ACS 3.2 - Windows AD Sequence of events: 1. 802.1x machine authenticatio

  • Missing files on iDVD start up

    Whenever I start up iDVD I get a missing files notice that reads: Macintosh HD/Library/Application Support/iDVD/Tutorial/Pictures Picture and Macintosh HD/Library/Application Support/iDVD/Tutorial/Pictures video I remember going through the tutorial

  • Subscribe button? {subject and post edited by moderator}

    Would like to add a "subscribe me to my wordpress.org site" button or form on my dreamweaver index.html page. Any Thoughts?

  • Iphoto won't open, conflict with OS after update.

    I am running an older version of iphoto. Version 8.1.2. I updated my OS recently to 10.8.2 and now iphoto won't open, I am getting a message that it is a software conflict. I know this is a problem people had awhile ago, but I am just updating things

  • Pages 4.3 only saving as version

    I have 10.9.4 installed and use 4.3 pages, it starts working fine but before long the pages icon bounces with a message: this doc could not be saved it has been changed by another application, you can revert changes or save as a version. I choose the