@@ -929,64 +929,3 @@ TEST_F (DataTreeQueryTests, XPathComplexExpressions)
929929 auto result3 = DataTreeQuery::xpath (testTree, " //Button[not(@enabled='false')]" ).nodes ();
930930 EXPECT_GT (static_cast <int > (result3.size ()), 0 );
931931}
932-
933- // ==============================================================================
934- // Performance Tests
935-
936- TEST_F (DataTreeQueryTests, LargeDatasetPerformance)
937- {
938- // Create large dataset
939- DataTree largeTree (" LargeRoot" );
940- {
941- auto transaction = largeTree.beginTransaction (" Build large dataset" );
942-
943- for (int i = 0 ; i < 1000 ; ++i)
944- {
945- DataTree item (" Item" );
946- {
947- auto itemTrans = item.beginTransaction (" Setup item" );
948- itemTrans.setProperty (" id" , i);
949- itemTrans.setProperty (" category" , i % 10 );
950- itemTrans.setProperty (" active" , i % 2 == 0 );
951- itemTrans.setProperty (" score" , i * 1.5 );
952- }
953- transaction.addChild (item);
954- }
955- }
956-
957- // Test performance doesn't degrade severely
958- auto start = std::chrono::high_resolution_clock::now ();
959-
960- auto result = DataTreeQuery::from (largeTree)
961- .descendants (" Item" )
962- .propertyWhere <int > (" category" , [] (int cat)
963- {
964- return cat < 5 ;
965- }).propertyWhere <bool > (" active" , [] (bool active)
966- {
967- return active;
968- }).take (100 )
969- .nodes ();
970-
971- auto end = std::chrono::high_resolution_clock::now ();
972- auto duration = std::chrono::duration_cast<std::chrono::milliseconds> (end - start);
973-
974- // Should complete within reasonable time (adjust threshold as needed)
975- EXPECT_LT (duration.count (), 100 ); // Less than 100ms
976- EXPECT_GT (static_cast <int > (result.size ()), 0 );
977- EXPECT_LE (static_cast <int > (result.size ()), 100 );
978- }
979-
980- /*
981- TEST_F(DataTreeQueryTests, OutOfBoundsAccess)
982- {
983- auto result = DataTreeQuery::from(testTree).children();
984-
985- // Test that accessing beyond bounds returns invalid node
986- auto node = result.getNode(-1);
987- // This should trigger an assertion in debug builds, but not crash in release
988-
989- // In release builds, should handle gracefully
990- SUCCED();
991- }
992- */
0 commit comments