Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    #16
    Pooling is on by default, with certain exceptions (like DynamicDSGenerator). As we mentioned, if you temporarily turn on pooling-related logs, you will see log messages about DataSources being borrowed and returned. Background here:

    https://smartclient.com/smartclient-...Implementation

    If you confirm that pooling has not been disabled, we would recommend using a Java profiler to see where the bottlenecks are. It's probably going to be something weird that no one could have guessed would be the culprit in advance.

    Comment


      #17
      Hello, about dataSource pooling, what I see is a log like this, for every dataSource, on first load:

      Code:
      DEBUG PoolableDataSourceFactory Created DataSource 52 of type 'ANAG_GRAFICI_MATCH_ANALYSIS' with hashCode '145547712' and assigned it to thread https-jsse-nio-8443-exec-8
      DEBUG PoolableDataSourceFactory Created DataSource 52 of type 'ANAG_GRAFICI_MATCH_ANALYSIS' with hashCode '145547712' in the pooling flow
      DEBUG PoolableDataSourceFactory Activated DataSource 52 of type 'ANAG_GRAFICI_MATCH_ANALYSIS' with hashCode '145547712'
      DEBUG PoolableDataSourceFactory Cleared and passivated DataSource 52 of type 'ANAG_GRAFICI_MATCH_ANALYSIS' with hashCode '145547712'
      on the second load I see this, for the same dataSources:

      Code:
      DEBUG PoolableDataSourceFactory Activated DataSource 52 of type 'ANAG_GRAFICI_MATCH_ANALYSIS' with hashCode '145547712'
      DEBUG PoolableDataSourceFactory Cleared and passivated DataSource 52 of type 'ANAG_GRAFICI_MATCH_ANALYSIS' with hashCode '145547712'
      does this seem correct?

      About the java profiler, unfortunately I'm not an expert, at a first glance it seems that a lot of time is spent in that _cloneConfigForSecurityAnnotations method, does this even make sense?


      Click image for larger version

Name:	2024-01-02 17.39.06.jpg
Views:	89
Size:	73.3 KB
ID:	271471
      Attached Files

      Comment


        #18
        Hmm, there normally should not be a Reflection call in that codepath. Do you have any custom (non-framework) properties in your .ds.xml definitions - anything that isn't just a simple String value? Or do you do anything like use DSField.put() to put custom objects into your fields or DataSource definition (note this wouldn't be valid, due to pooling).

        Comment


          #19
          Nope to both questions.

          Actually I see many calls to Reflection.findMethod, as in this debugger screenshot:

          Click image for larger version

Name:	2024-01-02 22.35.22.jpg
Views:	95
Size:	52.0 KB
ID:	271474

          smartClient version is 'v13.0p_2023-12-08/Enterprise Deployment'

          Comment


            #20
            as a side note, only on first load I've got a bunch of logs like these:

            Code:
            WARN DefaultValidators Field 'name' not found in data source 'ServerObject'
            WARN DefaultValidators Field 'name' not found in data source 'AdvancedCriteria'
            WARN DefaultValidators Field 'name' not found in data source 'Criterion'
            which so far seems relative to fields with validators using <applyWhen>, or to fields with custom simple types which I have defined, ie like:

            Code:
            <SimpleType name="trimText" inheritsFrom="text" editorType="TextItem">
                <validators>
                    <validator type="serverCustom">
                        <serverObject lookupStyle="new" className="com.my.types.TrimDMI"/>
                    </validator>
                </validators>
            </SimpleType>

            Comment


              #21
              Originally posted by claudiobosticco View Post
              which so far seems relative to fields with validators using <applyWhen>, or to fields with custom simple types which I have defined, ie like:
              actually they're relative to fields with validators using <applyWhen>, and to the loading of my custom Simple Types xml definitions

              Comment


                #22
                Hello, are you investigating this problem, or do you need more debugging by my side?

                Comment


                  #23
                  Nothing more is needed from you for now - we're going to try to figure out why that Reflection call is appearing in the middle of your DataSourceLoader processing, as it's probably possible for the framework to avoid it.

                  Note that Reflection can be radically more or less expensive in different environments. One factor is a long classpath with duplicates, so you could look at reducing the cost of Reflection calls if you want.

                  Comment


                    #24
                    Hello, just chiming in to ask if there's some update

                    Comment

                    Working...
                    X